From b687c13baa9f362da8d6e31995faed766bc0c30a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ken-H=C3=A5vard=20Lieng?= Date: Sat, 30 May 2015 01:09:52 +0200 Subject: [PATCH] Pass server as parameter instead of capturing it in reconnect() --- server/server.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server/server.go b/server/server.go index 1735ad49..d36aec11 100644 --- a/server/server.go +++ b/server/server.go @@ -68,7 +68,7 @@ func reconnect() { irc.Password = server.Password irc.Realname = server.Realname - go func() { + go func(server storage.Server) { err := irc.Connect(server.Address) if err != nil { log.Println(err) @@ -85,7 +85,7 @@ func reconnect() { } irc.Join(joining...) } - }() + }(server) } } }