From 3140992bb722519cbd5d9f1babb1de41e4f8d353 Mon Sep 17 00:00:00 2001 From: Ben Pfaff Date: Thu, 3 Apr 2008 09:28:13 -0700 Subject: [PATCH] Make vconn-tcp log an error when the connection drops mid-packet. --- lib/vconn-tcp.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lib/vconn-tcp.c b/lib/vconn-tcp.c index 5f468ae4..ea702605 100644 --- a/lib/vconn-tcp.c +++ b/lib/vconn-tcp.c @@ -213,7 +213,12 @@ again: } return EAGAIN; } else if (retval == 0) { - return rx->size ? EPROTO : EOF; + if (rx->size) { + VLOG_ERR("connection dropped mid-packet"); + return EPROTO; + } else { + return EOF; + } } else { return retval ? errno : EAGAIN; } -- 2.30.2