Skip to content

Commit

Permalink
dulwich: flush stdin channel on asyncssh vendor write
Browse files Browse the repository at this point in the history
  • Loading branch information
pmrowla authored and efiop committed Nov 17, 2021
1 parent 25dca0b commit 28f5793
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions dvc/scm/git/backend/dulwich/asyncssh_vendor.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,17 @@ async def _read(self, n: Optional[int] = None) -> bytes:

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.
Expand Down

0 comments on commit 28f5793

Please sign in to comment.