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,10 +69,8 @@ func reconnect() {
|
|||
i.Password = server.Password
|
||||
i.Realname = server.Realname
|
||||
|
||||
go func(server storage.Server) {
|
||||
i.Connect(server.Address)
|
||||
session.setIRC(i.Host, i)
|
||||
|
||||
go handleIRC(i, session)
|
||||
|
||||
var joining []string
|
||||
|
@ -82,7 +80,6 @@ func reconnect() {
|
|||
}
|
||||
}
|
||||
i.Join(joining...)
|
||||
}(server)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -99,7 +99,6 @@ func handleWS(conn *websocket.Conn) {
|
|||
session.setIRC(data.Server[:idx], i)
|
||||
}
|
||||
|
||||
go func() {
|
||||
i.Connect(data.Server)
|
||||
go handleIRC(i, session)
|
||||
|
||||
|
@ -112,7 +111,6 @@ func handleWS(conn *websocket.Conn) {
|
|||
Username: data.Username,
|
||||
Realname: data.Realname,
|
||||
})
|
||||
}()
|
||||
} else {
|
||||
log.Println(addr, "already connected to", data.Server)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue