]> git.meshlink.io Git - meshlink-tiny/blobdiff - src/protocol_key.c
Remove support for multiple connections.
[meshlink-tiny] / src / protocol_key.c
index de6b1e5ea34ff3c67ac68c1e58ada692253022f4..e89f8ecec4eab958c7948c28ce7361987b4395a1 100644 (file)
@@ -182,10 +182,10 @@ static bool req_key_ext_h(meshlink_handle_t *mesh, connection_t *c, const char *
                }
 
                /* If we are trying to form an outgoing connection to this node, retry immediately */
-               for list_each(outgoing_t, outgoing, mesh->outgoings) {
-                       if(outgoing->node == from && outgoing->ev.cb) {
-                               outgoing->timeout = 0;
-                               timeout_set(&mesh->loop, &outgoing->ev, &(struct timespec) {
+               if(mesh->outgoing) {
+                       if(mesh->outgoing->node == from && mesh->outgoing->ev.cb) {
+                               mesh->outgoing->timeout = 0;
+                               timeout_set(&mesh->loop, &mesh->outgoing->ev, &(struct timespec) {
                                        0, 0
                                });
                        }