go.crypto/ssh: respect adjust window msg on server.
R=golang-dev CC=agl, golang-dev https://golang.org/cl/5908048
This commit is contained in:
committed by
Adam Langley
parent
a1a1826210
commit
452b645a37
@@ -149,6 +149,9 @@ func (c *channel) handlePacket(packet interface{}) {
|
||||
case *channelEOFMsg:
|
||||
c.theySentEOF = true
|
||||
c.cond.Signal()
|
||||
case *windowAdjustMsg:
|
||||
c.theirWindow += packet.AdditionalBytes
|
||||
c.cond.Signal()
|
||||
default:
|
||||
panic("unknown packet type")
|
||||
}
|
||||
|
||||
@@ -570,6 +570,16 @@ func (s *ServerConn) Accept() (Channel, error) {
|
||||
c.handlePacket(msg)
|
||||
s.lock.Unlock()
|
||||
|
||||
case *windowAdjustMsg:
|
||||
s.lock.Lock()
|
||||
c, ok := s.channels[msg.PeersId]
|
||||
if !ok {
|
||||
s.lock.Unlock()
|
||||
continue
|
||||
}
|
||||
c.handlePacket(msg)
|
||||
s.lock.Unlock()
|
||||
|
||||
case *channelEOFMsg:
|
||||
s.lock.Lock()
|
||||
c, ok := s.channels[msg.PeersId]
|
||||
|
||||
Reference in New Issue
Block a user