close ready when ClientConn closes

This commit is contained in:
iamqizhao 2015-03-04 13:00:47 -08:00
parent c73e40b804
commit 28ad38be17
1 changed files with 4 additions and 0 deletions

View File

@ -244,6 +244,10 @@ func (cc *ClientConn) Close() error {
return ErrClientConnClosing
}
cc.closing = true
if cc.ready != nil {
close(cc.ready)
cc.ready = nil
}
if cc.transport != nil {
cc.transport.Close()
}