Stop creating new goroutines for irc.Connect() since it doesnt block anymore
This commit is contained in:
parent
adcf12e1fa
commit
ebdb382706
@ -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…
Reference in New Issue
Block a user