When receiving a long delayed cancel request process it before pruning
This commit is contained in:
parent
3eee442f28
commit
d224a4c39f
@ -433,12 +433,16 @@ class FileTransmission:
|
||||
self.drop_receive(k)
|
||||
|
||||
def handle_serialized_command(self, data: str) -> None:
|
||||
self.prune_expired()
|
||||
try:
|
||||
cmd = FileTransmissionCommand.deserialize(data)
|
||||
except Exception as e:
|
||||
log_error(f'Failed to parse file transmission command with error: {e}')
|
||||
return
|
||||
if cmd.action is Action.cancel:
|
||||
if cmd.id in self.active_receives:
|
||||
self.handle_receive_cmd(cmd)
|
||||
return
|
||||
self.prune_expired()
|
||||
if cmd.id in self.active_receives or cmd.action is Action.send:
|
||||
self.handle_receive_cmd(cmd)
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user