aboutsummaryrefslogtreecommitdiff
path: root/nbd
diff options
context:
space:
mode:
Diffstat (limited to 'nbd')
-rw-r--r--nbd/server.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/nbd/server.c b/nbd/server.c
index d9164ee..74ba487 100644
--- a/nbd/server.c
+++ b/nbd/server.c
@@ -1418,6 +1418,9 @@ static int nbd_receive_request(NBDClient *client, NBDRequest *request,
if (ret < 0) {
return ret;
}
+ if (ret == 0) {
+ return -EIO;
+ }
/* Request
[ 0 .. 3] magic (NBD_REQUEST_MAGIC)