浏览代码

Fixed remote store race condition

Jonas Borgström 14 年之前
父节点
当前提交
95a9a45604
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2 2
      darc/remote.py

+ 2 - 2
darc/remote.py

@@ -111,8 +111,8 @@ class RemoteStore(object):
     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):