diff options
author | James Clarke <jrtc27@jrtc27.com> | 2018-04-17 15:10:58 +0100 |
---|---|---|
committer | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2018-05-31 21:19:24 +0200 |
commit | 740892b72d2bdd5674306ae601f4d043be7cd956 (patch) | |
tree | 2ecd15708a252b5a554d0cd04a2992c9fc4435f4 | |
parent | a34ff158595f29cb904a3fc05a3ecd815ef0c8b7 (diff) | |
download | slirp-740892b72d2bdd5674306ae601f4d043be7cd956.zip slirp-740892b72d2bdd5674306ae601f4d043be7cd956.tar.gz slirp-740892b72d2bdd5674306ae601f4d043be7cd956.tar.bz2 |
slirp: Send window updates to guest after window was closed
If the receive window presented to the guest closes, slirp should send a
window update once the window reopens sufficiently, rather than forcing
the guest to send a window probe, which can take several seconds.
Signed-off-by: James Clarke <jrtc27@jrtc27.com>
Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
-rw-r--r-- | slirp.c | 12 |
1 files changed, 6 insertions, 6 deletions
@@ -675,13 +675,13 @@ void slirp_pollfds_poll(GArray *pollfds, int select_error) /* continue; */ } else { ret = sowrite(so); + if (ret > 0) { + /* Call tcp_output in case we need to send a window + * update to the guest, otherwise it will be stuck + * until it sends a window probe. */ + tcp_output(sototcpcb(so)); + } } - /* - * XXXXX If we wrote something (a lot), there - * could be a need for a window update. - * In the worst case, the remote will send - * a window probe to get things going again - */ } /* |