summaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/router.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/router.c b/src/router.c
index 0040e7a..c68d0d5 100644
--- a/src/router.c
+++ b/src/router.c
@@ -213,6 +213,9 @@ int router_setup_interface(struct interface *iface, bool enable)
}
out:
if (ret < 0 && iface->router_event.uloop.fd >= 0) {
+ if (iface->router_event.uloop.registered)
+ uloop_fd_delete(&iface->router_event.uloop);
+
close(iface->router_event.uloop.fd);
iface->router_event.uloop.fd = -1;
}