summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJesper Jensen <jesper@jnsn.dev>2025-05-11 22:29:46 +0200
committerJesper Jensen <jesper@jnsn.dev>2025-05-11 22:29:46 +0200
commita806da7ddbb62b70322db412089af8749ec4e741 (patch)
tree37f9a9b8d587f1fd09baeb513734ba15c9f8ff81 /src
parentd6318a064954f54530a87ae9a21a2cf78c32f7cb (diff)
Discard lookup responses when it's completed
Diffstat (limited to 'src')
-rw-r--r--src/proto.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/proto.c b/src/proto.c
index cbf50d1..ed23112 100644
--- a/src/proto.c
+++ b/src/proto.c
@@ -291,7 +291,11 @@ PROCESS_REPONSE(lookup_response) {
fatal("Response too short");
}
- assert(cont->lookup->state == OP_ACTIVE);
+ if(cont->lookup->state != OP_ACTIVE) {
+ // The lookup is not running so we have nowhere to dump the result.
+ // Just discard the packet
+ return PROTO_EDISC;
+ }
struct nodeid id;
uint8_t nodes_len;