Cleanly remove the device FD from the event loop before closing it.
[tinc] / src / net_setup.c
index 7c9f23a..f0ccc3c 100644 (file)
@@ -1117,6 +1117,8 @@ void close_network_connections(void) {
        for(int i = 0; i < 4; i++)
                free(envp[i]);
 
+       if (device_fd >= 0)
+               io_del(&device_io);
        devops.close();
 
        exit_control();