Pass server as parameter instead of capturing it in reconnect()

This commit is contained in:
Ken-Håvard Lieng 2015-05-30 01:09:52 +02:00
parent 4d8c52fa22
commit b687c13baa

View File

@ -68,7 +68,7 @@ func reconnect() {
irc.Password = server.Password irc.Password = server.Password
irc.Realname = server.Realname irc.Realname = server.Realname
go func() { go func(server storage.Server) {
err := irc.Connect(server.Address) err := irc.Connect(server.Address)
if err != nil { if err != nil {
log.Println(err) log.Println(err)
@ -85,7 +85,7 @@ func reconnect() {
} }
irc.Join(joining...) irc.Join(joining...)
} }
}() }(server)
} }
} }
} }