comparison mercurial/sshpeer.py @ 52277:f6b30f4b5e07 stable

sshpeer: fix another occurrence of short write handling This one is much less likely to be problematic in practice since the data we're writing is constant-size, but it's not enough to completely rule out the problem.
author Arseniy Alekseyev <aalekseyev@janestreet.com>
date Thu, 06 Feb 2025 15:37:59 +0000
parents 7aec18bded6d
children 5ec596c91086
comparison
equal deleted inserted replaced
52276:7aec18bded6d 52277:f6b30f4b5e07
340 ui.debug(b'devel-peer-request: hello+between\n') 340 ui.debug(b'devel-peer-request: hello+between\n')
341 ui.debug(b'devel-peer-request: pairs: %d bytes\n' % len(pairsarg)) 341 ui.debug(b'devel-peer-request: pairs: %d bytes\n' % len(pairsarg))
342 ui.debug(b'sending hello command\n') 342 ui.debug(b'sending hello command\n')
343 ui.debug(b'sending between command\n') 343 ui.debug(b'sending between command\n')
344 344
345 stdin.write(b''.join(handshake)) 345 _write_all(stdin.write, b''.join(handshake))
346 stdin.flush() 346 stdin.flush()
347 except IOError: 347 except IOError:
348 badresponse() 348 badresponse()
349 349
350 # Assume version 1 of wire protocol by default. 350 # Assume version 1 of wire protocol by default.