From a7dac6e899933381f2eaf0b39c2efcc06744f3a9 Mon Sep 17 00:00:00 2001 From: Roy Marples Date: Fri, 1 Nov 2019 23:29:06 +0000 Subject: [PATCH] control: when closing, remove from eloop. --- src/control.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/control.c b/src/control.c index 4ae22793..8825a362 100644 --- a/src/control.c +++ b/src/control.c @@ -274,9 +274,8 @@ control_stop(struct dhcpcd_ctx *ctx) if (ctx->control_fd == -1) return 0; - eloop_event_delete(ctx->eloop, ctx->control_fd); - close(ctx->control_fd); - ctx->control_fd = -1; + + control_close(ctx); if (unlink(ctx->control_sock) == -1) retval = -1; @@ -455,6 +454,7 @@ control_close(struct dhcpcd_ctx *ctx) { if (ctx->control_fd != -1) { + eloop_event_delete(ctx->eloop, ctx->control_fd); close(ctx->control_fd); ctx->control_fd = -1; } -- 2.47.3