summaryrefslogtreecommitdiffstats
path: root/src/sync-mode.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/sync-mode.c')
-rw-r--r--src/sync-mode.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/sync-mode.c b/src/sync-mode.c
index 6781f10..63fae68 100644
--- a/src/sync-mode.c
+++ b/src/sync-mode.c
@@ -295,7 +295,8 @@ static int init_sync(void)
if (STATE_SYNC(external)->init() == -1)
return -1;
- channel_init();
+ if (channel_init() == -1)
+ return -1;
/* channel to send events on the wire */
STATE_SYNC(channel) =
@@ -397,6 +398,8 @@ static void kill_sync(void)
queue_destroy(STATE_SYNC(tx_queue));
+ channel_end();
+
origin_unregister(STATE_SYNC(commit).h);
nfct_close(STATE_SYNC(commit).h);
destroy_evfd(STATE_SYNC(commit).evfd);