From 9e572a793949d788000b40a6a064b4688c142fdc Mon Sep 17 00:00:00 2001 From: David Wilson Date: Sat, 11 Aug 2018 17:39:42 +0100 Subject: [PATCH] ansible: fix duplicate MuxProcess socket write. The while: loop was necessary due to some cutpaste further on down the file. --- ansible_mitogen/process.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/ansible_mitogen/process.py b/ansible_mitogen/process.py index 2f275dc0..5ce1b8be 100644 --- a/ansible_mitogen/process.py +++ b/ansible_mitogen/process.py @@ -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)