Add a missing check of outgoing_data.

When the whole SSH connection is throttled and then unthrottled, we
need to requeue the callback that transfers data to the Socket from
the new outgoing_data queue introduced in commit 9e3522a97.

The user-visible effect of this missing call was that outgoing SFTP
transactions would lock up, because in SFTP mode we enable the
"simple@putty.projects.tartarus.org" mode and essentially turn off the
per-channel window management, so throttling of the whole connection
becomes the main source of back-pressure.
This commit is contained in:
Simon Tatham 2018-06-13 19:44:44 +01:00
Родитель 281d317ab9
Коммит ba5e56cd1b
1 изменённых файлов: 6 добавлений и 3 удалений

9
ssh.c
Просмотреть файл

@ -2310,11 +2310,14 @@ static void ssh_sent(Plug plug, int bufsize)
{
Ssh ssh = FROMFIELD(plug, struct ssh_tag, plugvt);
/*
* If the send backlog on the SSH socket itself clears, we
* should unthrottle the whole world if it was throttled.
* If the send backlog on the SSH socket itself clears, we should
* unthrottle the whole world if it was throttled, and also resume
* sending our bufchain of queued wire data.
*/
if (bufsize < SSH_MAX_BACKLOG)
if (bufsize < SSH_MAX_BACKLOG) {
ssh_throttle_all(ssh, 0, bufsize);
queue_idempotent_callback(&ssh->outgoing_data_sender);
}
}
static void ssh_hostport_setup(const char *host, int port, Conf *conf,