R=golang-dev CC=agl, golang-dev https://golang.org/cl/5908048
@@ -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()
+ s.lock.Lock()
+ c, ok := s.channels[msg.PeersId]
+ if !ok {
+ s.lock.Unlock()
+ continue
+ }
+ c.handlePacket(msg)
+
s.lock.Lock()
c, ok := s.channels[msg.PeersId]