X-Git-Url: http://git.meshlink.io/?a=blobdiff_plain;f=src%2Fprotocol_misc.c;fp=src%2Fprotocol_misc.c;h=c6a3630ae2ea190fc27ee41dbe8b9206c85591b9;hb=42874d60e2554393094ea5cc1325ab2984750cbc;hp=af3caddf8957f38006a540ddc331cfe0823efcdd;hpb=a97a07d79c847d0b30c61a2589e7bde62f25d603;p=meshlink 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;