diff --git a/darc/remote.py b/darc/remote.py index 1d31186ff..fcd4ee45f 100644 --- a/darc/remote.py +++ b/darc/remote.py @@ -111,8 +111,8 @@ def __init__(self, location, create=False): def wait(self, write=True): with self.channel.lock: if ((not write or self.channel.out_window_size == 0) and - not self.channel.recv_ready() and - not self.channel.recv_stderr_ready()): + len(self.channel.in_buffer._buffer) == 0 and + len(self.channel.in_stderr_buffer._buffer) == 0): self.channel.out_buffer_cv.wait(10) def cmd(self, cmd, args, callback=None, callback_data=None):