From a806da7ddbb62b70322db412089af8749ec4e741 Mon Sep 17 00:00:00 2001 From: Jesper Jensen Date: Sun, 11 May 2025 22:29:46 +0200 Subject: Discard lookup responses when it's completed --- src/proto.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src') 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; -- cgit v1.2.3