Stop creating new goroutines for irc.Connect() since it doesnt block anymore
This commit is contained in:
parent
adcf12e1fa
commit
ebdb382706
2 changed files with 20 additions and 25 deletions
|
@ -69,20 +69,17 @@ func reconnect() {
|
|||
i.Password = server.Password
|
||||
i.Realname = server.Realname
|
||||
|
||||
go func(server storage.Server) {
|
||||
i.Connect(server.Address)
|
||||
session.setIRC(i.Host, i)
|
||||
i.Connect(server.Address)
|
||||
session.setIRC(i.Host, i)
|
||||
go handleIRC(i, session)
|
||||
|
||||
go handleIRC(i, session)
|
||||
|
||||
var joining []string
|
||||
for _, channel := range channels {
|
||||
if channel.Server == server.Address {
|
||||
joining = append(joining, channel.Name)
|
||||
}
|
||||
var joining []string
|
||||
for _, channel := range channels {
|
||||
if channel.Server == server.Address {
|
||||
joining = append(joining, channel.Name)
|
||||
}
|
||||
i.Join(joining...)
|
||||
}(server)
|
||||
}
|
||||
i.Join(joining...)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue