diff options
-rw-r--r-- | geo-replication/syncdaemon/resource.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/geo-replication/syncdaemon/resource.py b/geo-replication/syncdaemon/resource.py index 14fd76a7d59..c26054ad9df 100644 --- a/geo-replication/syncdaemon/resource.py +++ b/geo-replication/syncdaemon/resource.py @@ -152,6 +152,9 @@ class Popen(subprocess.Popen): poe, _, _ = select( [po.stderr for po in errstore], [], [], 1) except (ValueError, SelectError): + # stderr is already closed wait for some time before + # checking next error + time.sleep(0.5) continue for po in errstore: if po.stderr not in poe: @@ -164,6 +167,7 @@ class Popen(subprocess.Popen): try: fd = po.stderr.fileno() except ValueError: # file is already closed + time.sleep(0.5) continue l = os.read(fd, 1024) if not l: |