From: Roy Marples Date: Fri, 1 Nov 2019 23:29:06 +0000 (+0000) Subject: control: when closing, remove from eloop. X-Git-Tag: v8.1.2~29 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a7dac6e899933381f2eaf0b39c2efcc06744f3a9;p=thirdparty%2Fdhcpcd.git control: when closing, remove from eloop. --- 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; }