go.crypto/ssh: assorted close related fixes
Fixes golang/go#3810. Fixes chanWriter Write after close behaviour bug. Fixes serverChan writePacket after close bug. Addresses final comments by agl on 6405064, plus various cleanups. R=agl, kardianos, gustav.paul, fullung CC=golang-dev https://golang.org/cl/6479056
This commit is contained in:
+1
-1
@@ -536,7 +536,7 @@ func (s *ServerConn) Accept() (Channel, error) {
|
||||
|
||||
// TODO(dfc) s.lock protects s.channels but isn't being held here.
|
||||
for _, c := range s.channels {
|
||||
c.dead = true
|
||||
c.setDead()
|
||||
c.handleData(nil)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user