X-Git-Url: https://tinc-vpn.org/git/browse?p=tinc;a=blobdiff_plain;f=src%2Fnet.c;h=c5e5707b9ae415538e3db79ca8cc21dae0c8f90b;hp=e5ffc4f528bcba92daaad1aa538e0dc283f2c730;hb=b0cc043315220046973d28b144665b2c820e3bd6;hpb=7df18f17d159a5f410ff2f1395198a3496a80fd4 diff --git a/src/net.c b/src/net.c index e5ffc4f5..c5e5707b 100644 --- a/src/net.c +++ b/src/net.c @@ -212,6 +212,12 @@ void terminate_connection(connection_t *c, bool report) { c->status.remove = false; do_outgoing_connection(c); } + +#ifndef HAVE_MINGW + /* Clean up dead proxy processes */ + + while(waitpid(-1, NULL, WNOHANG) > 0); +#endif } /* @@ -490,7 +496,8 @@ int main_loop(void) { expire_events(); for(node = connection_tree->head; node; node = node->next) { connection_t *c = node->data; - send_ping(c); + if(c->status.active) + send_ping(c); } sigalrm = false; }