mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-03-21 22:28:37 -05:00
Be a little less enthusiastic about sending SSH_MSG_CHANNEL_WINDOW_ADJUST:
only send it when it will significantly increase the server's idea of our window. This avoids the slew of one-byte WINDOW_ADJUSTs that an interactive shell typically generates. [originally from svn r5121]
This commit is contained in:
parent
a6614021ee
commit
214e11a7fe
9
ssh.c
9
ssh.c
@ -5439,7 +5439,14 @@ static void ssh2_set_window(struct ssh_channel *c, unsigned newwin)
|
|||||||
if (c->closes != 0)
|
if (c->closes != 0)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (newwin > c->v.v2.locwindow) {
|
/*
|
||||||
|
* Only send a WINDOW_ADJUST if there's significantly more window
|
||||||
|
* available than the other end thinks there is. This saves us
|
||||||
|
* sending a WINDOW_ADJUST for every character in a shell session.
|
||||||
|
*
|
||||||
|
* "Significant" is arbitrarily defined as half the window size.
|
||||||
|
*/
|
||||||
|
if (newwin > c->v.v2.locwindow * 2) {
|
||||||
struct Packet *pktout;
|
struct Packet *pktout;
|
||||||
|
|
||||||
pktout = ssh2_pkt_init(SSH2_MSG_CHANNEL_WINDOW_ADJUST);
|
pktout = ssh2_pkt_init(SSH2_MSG_CHANNEL_WINDOW_ADJUST);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user