dulwich: flush stdin channel on asyncssh vendor write

This commit is contained in:
Peter Rowlands
2021-11-17 12:48:34 +02:00
committed by Ruslan Kuprieiev
parent 25dca0b665
commit 28f57933db
@@ -41,11 +41,17 @@ class AsyncSSHWrapper(BaseAsyncObject):
read = sync_wrapper(_read)
def write(self, data: bytes):
async def _write(self, data: bytes):
self.proc.stdin.write(data)
await self.proc.stdin.drain()
def close(self):
write = sync_wrapper(_write)
async def _close(self):
self.conn.close()
await self.conn.wait_closed()
close = sync_wrapper(_close)
# NOTE: Github's SSH server does not strictly comply with the SSH protocol.