X-Git-Url: http://git.meshlink.io/?a=blobdiff_plain;f=src%2Fprotocol_misc.c;h=dde4bbb4db377445cda34c3b6e028ebb8268237f;hb=c023ad12147aa88810629c110ea6b1ab94267196;hp=d0401b93be299bddd5e232fda3f3bf6688ee6d58;hpb=0d133a5ff230ad78da3208d32521d7549836187e;p=meshlink diff --git a/src/protocol_misc.c b/src/protocol_misc.c index d0401b93..dde4bbb4 100644 --- a/src/protocol_misc.c +++ b/src/protocol_misc.c @@ -89,11 +89,12 @@ bool pong_h(meshlink_handle_t *mesh, connection_t *c, const char *request) { (void)request; c->status.pinged = false; - /* Succesful connection, reset timeout if this is an outgoing connection. */ + /* 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->cfg = NULL; + c->outgoing->state = OUTGOING_START; if(c->outgoing->ai) { freeaddrinfo(c->outgoing->ai);