mirror of https://github.com/fluffle/goirc
If client-side ping can be disabled, we need to ensure something absorbs the shutdown message.
This commit is contained in:
parent
3183c9f177
commit
f1d0dbe45a
|
@ -201,6 +201,9 @@ func (conn *Conn) postConnect() {
|
||||||
go conn.recv()
|
go conn.recv()
|
||||||
if conn.PingFreq > 0 {
|
if conn.PingFreq > 0 {
|
||||||
go conn.ping()
|
go conn.ping()
|
||||||
|
} else {
|
||||||
|
// Otherwise the send in shutdown will hang :-/
|
||||||
|
go func() { <-conn.cPing }()
|
||||||
}
|
}
|
||||||
go conn.runLoop()
|
go conn.runLoop()
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue