+ if(outgoing->ai) {
+ if(outgoing->state == OUTGOING_RECENT || outgoing->state == OUTGOING_KNOWN) {
+ free_known_addresses(outgoing->ai);
+ } else {
+ freeaddrinfo(outgoing->ai);
+ }
+ }
+
+ outgoing->state = OUTGOING_START;
+
+ if(outgoing->node->status.blacklisted) {
+ return;
+ }
+
+ if(mesh->connection_try_cb) {
+ mesh->connection_try_cb(mesh, (meshlink_node_t *)outgoing->node);
+ }
+
+ do_outgoing_connection(mesh, outgoing);
+}
+
+/// Delayed close of a filedescriptor.
+static void tarpit(int fd) {
+ static int pits[10] = {-1, -1, -1, -1, -1, -1, -1, -1, -1, -1};
+ static int next_pit = 0;
+
+ if(pits[next_pit] != -1) {
+ closesocket(pits[next_pit]);
+ }
+
+ pits[next_pit++] = fd;