aboutsummaryrefslogtreecommitdiff
path: root/slirp
diff options
context:
space:
mode:
authorJames Clarke <jrtc27@jrtc27.com>2018-04-17 15:10:58 +0100
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2018-05-31 21:19:24 +0200
commitb0060110aaaf3d2b7a0d2fc938e87848d188837c (patch)
treed7b3a1029ea2a07d581e60d8cbd856bc1f524920 /slirp
parent1fb3f7f285606c3af2b58cac52f47e9927a5ebea (diff)
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>
Diffstat (limited to 'slirp')
-rw-r--r--slirp/slirp.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/slirp/slirp.c b/slirp/slirp.c
index 4f29753444..5c3bd6163f 100644
--- a/slirp/slirp.c
+++ b/slirp/slirp.c
@@ -678,13 +678,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
- */
}
/*