]> git.meshlink.io Git - meshlink/blobdiff - src/meshlink.c
Never call timeout_set() outside callbacks if no callback is set.
[meshlink] / src / meshlink.c
index c34b24c9643f4bde69e2904877502e78c01f2b86..009839314cba71ca319455d657896c4d8bcd9cd1 100644 (file)
@@ -3863,7 +3863,7 @@ static void channel_retransmit(struct utcp_connection *utcp_connection) {
        node_t *n = utcp_connection->utcp->priv;
        meshlink_handle_t *mesh = n->mesh;
 
-       if(n->mtuprobes == 31) {
+       if(n->mtuprobes == 31 && n->mtutimeout.cb) {
                timeout_set(&mesh->loop, &n->mtutimeout, &(struct timespec) {
                        0, 0
                });