1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-01-09 17:38:00 +00:00

sshproxy: call backend_unthrottle on unfreeze.

If an SSH proxy socket is frozen for long enough, and the SSH server
continues to send, then sooner or later the proxy SSH connection will
end up having to freeze its underlying physical socket too. When the
proxy socket is later unfrozen, it needs to pass that unfreezing on in
turn.

The way this should happen is that when the SshProxy begins to clear
the backlog of data passed to it from the proxy SSH connection via
seat_stdout, it should call backend_unthrottle to inform that proxy
connection that the backlog is clearing.

But there was no backlog_unthrottle call in the whole of sshproxy.c.
Now there is.
This commit is contained in:
Simon Tatham 2022-03-30 18:15:43 +01:00
parent bdab00341b
commit 18896b662e

View File

@ -100,12 +100,20 @@ static void sshproxy_write_eof(Socket *s)
static void try_send_ssh_to_socket(void *ctx);
static void try_send_ssh_to_socket_cb(void *ctx)
{
SshProxy *sp = (SshProxy *)ctx;
try_send_ssh_to_socket(sp);
if (sp->backend)
backend_unthrottle(sp->backend, bufchain_size(&sp->ssh_to_socket));
}
static void sshproxy_set_frozen(Socket *s, bool is_frozen)
{
SshProxy *sp = container_of(s, SshProxy, sock);
sp->frozen = is_frozen;
if (!sp->frozen)
queue_toplevel_callback(try_send_ssh_to_socket, sp);
queue_toplevel_callback(try_send_ssh_to_socket_cb, sp);
}
static const char *sshproxy_socket_error(Socket *s)