int bufsize =
from_backend(pktin.type == SSH1_SMSG_STDERR_DATA,
pktin.body + 4, len);
- if (bufsize > SSH1_BUFFER_LIMIT) {
+ if (!ssh1_stdout_throttling && bufsize > SSH1_BUFFER_LIMIT) {
ssh1_stdout_throttling = 1;
ssh1_throttle(+1);
}
bufsize = 0; /* agent channels never back up */
break;
}
- if (bufsize > SSH1_BUFFER_LIMIT) {
+ if (!c->v.v1.throttling && bufsize > SSH1_BUFFER_LIMIT) {
c->v.v1.throttling = 1;
ssh1_throttle(+1);
}
void ssh_unthrottle(int bufsize)
{
if (ssh_version == 1) {
- if (bufsize < SSH1_BUFFER_LIMIT) {
+ if (ssh1_stdout_throttling && bufsize < SSH1_BUFFER_LIMIT) {
ssh1_stdout_throttling = 0;
ssh1_throttle(-1);
}