]> Git Repo - qemu.git/blobdiff - blockdev-nbd.c
nbd: Always call "close_fn" in nbd_client_new
[qemu.git] / blockdev-nbd.c
index bcdd18b3f61620e39035fb798004b97fc8638b59..4a758ac31431af9ad6ba592f336b8199c2859e89 100644 (file)
@@ -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);
     }
 }
 
This page took 0.021478 seconds and 4 git commands to generate.