aboutgitcodebugslistschat
path: root/tcp.c
diff options
context:
space:
mode:
Diffstat (limited to 'tcp.c')
-rw-r--r--tcp.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/tcp.c b/tcp.c
index 6e4b99b..eab5c13 100644
--- a/tcp.c
+++ b/tcp.c
@@ -2689,10 +2689,15 @@ eintr:
SPLICE_F_MOVE);
if (written > 0) {
- if (move_from == conn->from)
+ if (move_from == conn->from) {
conn->from_written += written;
- else
+ if (conn->from_read == conn->from_written)
+ break;
+ } else {
conn->to_written += written;
+ if (conn->to_read == conn->to_written)
+ break;
+ }
}
if (written < 0) {