diff options
Diffstat (limited to 'blockdev-nbd.c')
-rw-r--r-- | blockdev-nbd.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/blockdev-nbd.c b/blockdev-nbd.c index bcdd18b3f6..4a758ac314 100644 --- a/blockdev-nbd.c +++ b/blockdev-nbd.c @@ -27,9 +27,8 @@ static void nbd_accept(void *opaque) socklen_t addr_len = sizeof(addr); int fd = accept(server_fd, (struct sockaddr *)&addr, &addr_len); - if (fd >= 0 && !nbd_client_new(NULL, fd, nbd_client_put)) { - shutdown(fd, 2); - close(fd); + if (fd >= 0) { + nbd_client_new(NULL, fd, nbd_client_put); } } |