Permalink
Browse files

Clean up fdreceiver sockets on exit

  • Loading branch information...
1 parent 0515cd3 commit 5772631c7f29c83bad95599a3e5fb7a308101439 @andreil andreil committed May 27, 2012
Showing with 9 additions and 0 deletions.
  1. +7 −0 drivers/block-nbd.c
  2. +2 −0 drivers/tapdisk2.c
View
@@ -185,6 +185,13 @@ tdnbd_fdreceiver_start()
}
+void
+tdnbd_fdreceiver_stop()
+{
+ if (fdreceiver)
+ td_fdreceiver_stop(fdreceiver);
+}
+
static void
__cancel_req(int i, struct td_nbd_request *pos, int e)
{
View
@@ -42,6 +42,7 @@
#include "tapdisk-control.h"
void tdnbd_fdreceiver_start();
+void tdnbd_fdreceiver_stop();
static void
usage(const char *app, int err)
@@ -149,6 +150,7 @@ main(int argc, char *argv[])
err = tapdisk_server_run();
out:
+ tdnbd_fdreceiver_stop();
tapdisk_control_close();
tapdisk_stop_logging();
return -err;

0 comments on commit 5772631

Please sign in to comment.