diff options
| author | Jesper Jensen <jesper@jnsn.dev> | 2025-05-11 22:29:46 +0200 |
|---|---|---|
| committer | Jesper Jensen <jesper@jnsn.dev> | 2025-05-11 22:29:46 +0200 |
| commit | a806da7ddbb62b70322db412089af8749ec4e741 (patch) | |
| tree | 37f9a9b8d587f1fd09baeb513734ba15c9f8ff81 /src/proto.c | |
| parent | d6318a064954f54530a87ae9a21a2cf78c32f7cb (diff) | |
Discard lookup responses when it's completed
Diffstat (limited to 'src/proto.c')
| -rw-r--r-- | src/proto.c | 6 |
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; |
