diff options
| author | Roy Marples <roy@marples.name> | 2009-01-15 09:58:21 +0000 |
|---|---|---|
| committer | Roy Marples <roy@marples.name> | 2009-01-15 09:58:21 +0000 |
| commit | 6e0a88da1c424e2f521a000ffccf747767c41916 (patch) | |
| tree | fb2bb1773c275cf4eddd966786e595008b9cba2a /control.c | |
| parent | b66d49d3863e7ef38648ed59789bf0343a2a4798 (diff) | |
| download | dhcpcd-6e0a88da1c424e2f521a000ffccf747767c41916.tar.xz | |
We need to close our listeners before removing the socket so clients close down properly.
Diffstat (limited to 'control.c')
| -rw-r--r-- | control.c | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -152,11 +152,6 @@ stop_control(void) struct fd_list *l, *ll; delete_event(fd); - if (close(fd) == -1) - retval = 1; - fd = -1; - if (unlink(CONTROLSOCKET) == -1) - retval = -1; l = fds; while (l != NULL) { ll = l->next; @@ -165,6 +160,11 @@ stop_control(void) free(l); l = ll; } + if (close(fd) == -1) + retval = 1; + fd = -1; + if (unlink(CONTROLSOCKET) == -1) + retval = -1; return retval; } |
