ansible: fix duplicate MuxProcess socket write.

The while: loop was necessary due to some cutpaste further on down the
file.
This commit is contained in:
David Wilson 2018-08-11 17:39:42 +01:00
parent 49c804937d
commit 9e572a7939
1 changed files with 1 additions and 3 deletions

View File

@ -67,8 +67,7 @@ def clean_shutdown(sock):
has been printed.
"""
sock.shutdown(socket.SHUT_WR)
while sock.recv(1):
pass
sock.recv(1)
class MuxProcess(object):
@ -162,7 +161,6 @@ class MuxProcess(object):
# Let the parent know our listening socket is ready.
mitogen.core.io_op(self.child_sock.send, b('1'))
self.child_sock.send(b('1'))
# Block until the socket is closed, which happens on parent exit.
mitogen.core.io_op(self.child_sock.recv, 1)