projects
/
oweals
/
tinc.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
86116bb
)
When terminating, keep control connections open until the end.
author
Guus Sliepen
<guus@tinc-vpn.org>
Sat, 6 Oct 2012 19:16:17 +0000
(21:16 +0200)
committer
Guus Sliepen
<guus@tinc-vpn.org>
Sat, 6 Oct 2012 19:16:17 +0000
(21:16 +0200)
This ensures all device files and listening sockets have been closed before
tincctl gets notified of tincd's termination.
src/net_setup.c
patch
|
blob
|
history
diff --git
a/src/net_setup.c
b/src/net_setup.c
index 2a67d432f5c366192f34c8d2b0ac6aa588ae18d3..f07bdda4992395dbae37c4a983b2417483e69395 100644
(file)
--- a/
src/net_setup.c
+++ b/
src/net_setup.c
@@
-963,6
+963,9
@@
void close_network_connections(void) {
for(node = connection_tree->head; node; node = next) {
next = node->next;
c = node->data;
+ /* Keep control connections open until the end, so they know when we really terminated */
+ if(c->status.control)
+ c->socket = -1;
c->outgoing = NULL;
terminate_connection(c, false);
}