aboutsummaryrefslogtreecommitdiffstats
path: root/src/libmdsserver
diff options
context:
space:
mode:
Diffstat (limited to 'src/libmdsserver')
-rw-r--r--src/libmdsserver/mds-message.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/libmdsserver/mds-message.c b/src/libmdsserver/mds-message.c
index 1f05579..dcb8986 100644
--- a/src/libmdsserver/mds-message.c
+++ b/src/libmdsserver/mds-message.c
@@ -273,6 +273,11 @@ int mds_message_read(mds_message_t* restrict this, int fd)
this->buffer_ptr += (size_t)(got < 0 ? 0 : got);
if (errno)
return -1;
+ if (got == 0)
+ {
+ errno = ECONNRESET;
+ return -1;
+ }
}
}