/* 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;