Skip to content
Snippets Groups Projects
Commit a8fd1d07 authored by Marek Vavrusa's avatar Marek Vavrusa Committed by Jan Včelák
Browse files

Proper removing of UNIX control socket.

prev 3202195c
parent 6e677440
No related branches found
No related tags found
No related merge requests found
......@@ -365,11 +365,11 @@ int main(int argc, char **argv)
/* Close remote control interface */
if (remote > -1) {
close(remote);
}
/* Remove control socket. */
if (remote > -1 && conf()->ctl.iface->family == AF_UNIX) {
unlink(conf()->ctl.iface->address);
/* Remove control socket. */
conf_iface_t *ctl_if = conf()->ctl.iface;
if (ctl_if && ctl_if->family == AF_UNIX)
unlink(conf()->ctl.iface->address);
}
if ((server_wait(server)) != KNOT_EOK) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment