X-Git-Url: http://git.meshlink.io/?p=meshlink;a=blobdiff_plain;f=src%2Fprotocol_misc.c;h=c6a3630ae2ea190fc27ee41dbe8b9206c85591b9;hp=af3caddf8957f38006a540ddc331cfe0823efcdd;hb=963c5055505f2fc117cd5efa06eaa02c9b2bf85d;hpb=9cde0d32cf209388cc59b06b7dcb0c3432f97da5 diff --git a/src/protocol_misc.c b/src/protocol_misc.c index af3caddf..c6a3630a 100644 --- a/src/protocol_misc.c +++ b/src/protocol_misc.c @@ -109,17 +109,8 @@ bool pong_h(meshlink_handle_t *mesh, connection_t *c, const char *request) { /* Successful connection, reset timeout if this is an outgoing connection. */ - // TODO: completely remove this outgoing, let the autoconnect algorithm handle it if(c->outgoing) { - c->outgoing->timeout = 0; - c->outgoing->state = OUTGOING_START; - - if(c->outgoing->ai) { - freeaddrinfo(c->outgoing->ai); - } - - c->outgoing->ai = NULL; - c->outgoing->aip = NULL; + reset_outgoing(c->outgoing); } return true;