If client-side ping can be disabled, we need to ensure something absorbs the shutdown message.

This commit is contained in:
Alex Bramley 2011-11-15 22:57:29 +00:00
parent 3183c9f177
commit f1d0dbe45a
1 changed files with 3 additions and 0 deletions

View File

@ -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()
} }