Fix incorrect listen addr in error message

The various server goroutines would always capture the last listen
addr in the loop.
This commit is contained in:
Simon Ser 2022-01-19 22:38:13 +01:00
parent 69e9b6a439
commit f2a03cf7a1

View file

@ -142,6 +142,7 @@ func main() {
srv.Logger = soju.NewLogger(log.Writer(), debug)
for _, listen := range cfg.Listen {
listen := listen // copy
listenURI := listen
if !strings.Contains(listenURI, ":/") {
// This is a raw domain name, make it an URL with an empty scheme