Commit 90ec2033 authored by Dave Cheney's avatar Dave Cheney Committed by Adam Langley

exp/ssh: ensure initial window advertisement is not lost

Some remote servers send a 0 window size in the channel
open confirm msg, others send a non zero window size. Make
sure this initial advertisement is not lost.

R=agl, rsc, cw
CC=golang-dev
https://golang.org/cl/5372083
parent 06ef97e1
...@@ -195,6 +195,7 @@ func (c *ClientConn) openChan(typ string) (*clientChan, error) { ...@@ -195,6 +195,7 @@ func (c *ClientConn) openChan(typ string) (*clientChan, error) {
switch msg := (<-ch.msg).(type) { switch msg := (<-ch.msg).(type) {
case *channelOpenConfirmMsg: case *channelOpenConfirmMsg:
ch.peersId = msg.MyId ch.peersId = msg.MyId
ch.win <- int(msg.MyWindow)
case *channelOpenFailureMsg: case *channelOpenFailureMsg:
c.chanlist.remove(ch.id) c.chanlist.remove(ch.id)
return nil, errors.New(msg.Message) return nil, errors.New(msg.Message)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment