diff --git a/client/connection.go b/client/connection.go index b161d57..d92de24 100644 --- a/client/connection.go +++ b/client/connection.go @@ -201,6 +201,9 @@ func (conn *Conn) postConnect() { go conn.recv() if conn.PingFreq > 0 { go conn.ping() + } else { + // Otherwise the send in shutdown will hang :-/ + go func() { <-conn.cPing }() } go conn.runLoop() }