Permalink
Browse files

Fixing some copy/paste fail

  • Loading branch information...
1 parent 3ac94e9 commit ee656036859bbe194c59deac9aa909d1f970c4fa @bombela bombela committed Mar 27, 2012
Showing with 12 additions and 5 deletions.
  1. +4 −5 zerorpc/channel.py
  2. +4 −0 zerorpc/events.py
  3. +4 −0 zerorpc/heartbeat.py
View
@@ -164,6 +164,10 @@ def __init__(self, channel, inqueue_size=100):
self._verbose = False
self._recv_task = gevent.spawn(self._recver)
+ @property
+ def recv_is_available(self):
+ return self._channel.recv_is_available
+
def __del__(self):
self.close()
@@ -190,8 +194,6 @@ def _recver(self):
self._input_queue.put(event)
def emit(self, name, args, xheader={}, block=True, timeout=None):
- if self._lost_remote:
- raise self._lost_remote_exception()
if self._remote_queue_open_slots == 0:
if not block:
return False
@@ -211,9 +213,6 @@ def _request_data(self):
self._channel.emit('_zpc_more', (open_slots,))
def recv(self, timeout=None):
- if self._lost_remote:
- raise self._lost_remote_exception()
-
if self._verbose:
if self._input_queue_reserved < self._input_queue_size / 2:
self._request_data()
View
@@ -259,9 +259,13 @@ def setsockopt(self, *args):
class WrappedEvents(object):
+
def __init__(self, channel):
self._channel = channel
+ def close(self):
+ pass
+
@property
def recv_is_available(self):
return self._channel.recv_is_available
@@ -48,6 +48,10 @@ def __init__(self, channel, freq=5, passive=False):
if not passive:
self._start_heartbeat()
+ @property
+ def recv_is_available(self):
+ return self._channel.recv_is_available
+
def __del__(self):
self.close()

0 comments on commit ee65603

Please sign in to comment.