]> git.meshlink.io Git - meshlink/blobdiff - src/net_socket.c
Improve logging of connection attemps.
[meshlink] / src / net_socket.c
index 22cbe26fa08cc5725372517b42e829b8218dbcce..4989b6cf0578a0471a868cdfc8a1a09a633bdd32 100644 (file)
@@ -161,7 +161,7 @@ static void handle_meta_io(event_loop_t *loop, void *data, int flags) {
                if(!result) {
                        finish_connecting(mesh, c);
                } else {
-                       logger(mesh, MESHLINK_DEBUG, "Error while connecting to %s: %s", c->name, sockstrerror(result));
+                       logger(mesh, MESHLINK_ERROR, "Error while connecting to %s: %s", c->name, sockstrerror(result));
                        terminate_connection(mesh, c, false);
                        return;
                }
@@ -378,6 +378,7 @@ begin:
                        /* We are waiting for a callback from the ADNS thread */
                } else if(outgoing->state == OUTGOING_NO_KNOWN_ADDRESSES) {
                        logger(mesh, MESHLINK_ERROR, "No known addresses for %s", outgoing->node->name);
+                       list_delete(mesh->outgoings, outgoing);
                } else {
                        logger(mesh, MESHLINK_ERROR, "Could not set up a meta connection to %s", outgoing->node->name);
                        retry_outgoing(mesh, outgoing);