imageConnection: properly handle receiving R-messages with invalid tags (#205)
This commit is contained in:
parent
19cdfd0403
commit
b2e6dd01fe
1 changed files with 4 additions and 0 deletions
|
@ -68,6 +68,10 @@ class ImageConnection {
|
|||
}
|
||||
const tag = msg.readUint16LE(1);
|
||||
const promise = this.requests.get(tag);
|
||||
if (!promise) {
|
||||
logger.error(`Received response for unknown request ${tag}`);
|
||||
return;
|
||||
}
|
||||
this.requests.delete(tag);
|
||||
if (op === Rqueue) this.njobs++;
|
||||
if (op === Rcancel || op === Rwait) this.njobs--;
|
||||
|
|
Loading…
Reference in a new issue