mirror of
https://github.com/kovidgoyal/kitty.git
synced 2026-10-21 04:32:05 +00:00
Forgot to end receive sessions
This commit is contained in:
parent
646726b385
commit
ddb1fcf430
2 changed files with 6 additions and 1 deletions
|
|
@ -244,6 +244,10 @@ class Manager:
|
|||
self.transfer_done = False
|
||||
self.use_rsync = use_rsync
|
||||
|
||||
@property
|
||||
def finish_code(self) -> str:
|
||||
return FileTransmissionCommand(action=Action.finish).serialize()
|
||||
|
||||
def start_transfer(self) -> Iterator[str]:
|
||||
yield FileTransmissionCommand(action=Action.receive, bypass=self.bypass, size=len(self.spec)).serialize()
|
||||
for i, x in enumerate(self.spec):
|
||||
|
|
@ -438,6 +442,7 @@ class Receive(Handler):
|
|||
else:
|
||||
self.start_transfer()
|
||||
if self.manager.transfer_done:
|
||||
self.send_payload(self.manager.finish_code)
|
||||
self.quit_after_write_code = 0
|
||||
self.refresh_progress()
|
||||
elif self.transmit_started:
|
||||
|
|
|
|||
|
|
@ -815,7 +815,7 @@ class FileTransmission:
|
|||
self.send_transmission_error(asd.id, err)
|
||||
else:
|
||||
self.pump_send_chunks(asd)
|
||||
elif cmd.action is Action.status:
|
||||
elif cmd.action in (Action.status, Action.finish):
|
||||
self.drop_send(asd.id)
|
||||
return
|
||||
if not asd.accepted:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue