X-Git-Url: https://www.tinc-vpn.org/git/browse?a=blobdiff_plain;f=src%2Fnet.c;h=dbff75b9b1cfc95ced7c6522902ba5c9f17a5049;hb=1b30cee086148975886f961aadc26e23b1bfd6f2;hp=7d44d17c378f0bbbf2821bd6b4432dd43f5d6705;hpb=886a6f61a1f4cc48a77b42d10f34f9126377d904;p=tinc diff --git a/src/net.c b/src/net.c index 7d44d17c..dbff75b9 100644 --- a/src/net.c +++ b/src/net.c @@ -208,7 +208,7 @@ static void timeout_handler(int fd, short events, void *event) { event_add(event, &(struct timeval){pingtimeout, 0}); } -void handle_meta_connection_data(int fd, short events, void *data) { +void handle_meta_connection_data(void *data) { connection_t *c = data; int result; socklen_t len = sizeof result; @@ -230,9 +230,11 @@ void handle_meta_connection_data(int fd, short events, void *data) { } } - if (!receive_meta(c)) { - terminate_connection(c, c->status.active); - return; + while(true) { + if (!receive_meta(c)) { + terminate_connection(c, c->status.active); + return; + } } }