go.crypto/ssh: close channel feeding tcpListener.

Close both on closing the listener, and on closing the
connection. Test the former case.

R=dave
CC=golang-dev
https://golang.org/cl/11349043
This commit is contained in:
Han-Wen Nienhuys
2013-07-22 21:50:13 +10:00
committed by Dave Cheney
parent 396847505b
commit 7f7cbbf18e
3 changed files with 68 additions and 8 deletions
+2 -1
View File
@@ -210,7 +210,8 @@ func (c *ClientConn) kexDH(group *dhGroup, hashFunc crypto.Hash, magics *handsha
func (c *ClientConn) mainLoop() {
defer func() {
c.Close()
c.closeAll()
c.chanList.closeAll()
c.forwardList.closeAll()
}()
for {