diff options
Diffstat (limited to 'kazoo/protocol/connection.py')
-rw-r--r-- | kazoo/protocol/connection.py | 22 |
1 files changed, 0 insertions, 22 deletions
diff --git a/kazoo/protocol/connection.py b/kazoo/protocol/connection.py index 9cfb7a2..a63f470 100644 --- a/kazoo/protocol/connection.py +++ b/kazoo/protocol/connection.py @@ -26,7 +26,6 @@ from kazoo.protocol.serialization import ( Ping, PingInstance, ReplyHeader, - SetWatches, Transaction, Watch, int_struct @@ -60,7 +59,6 @@ CHILD_EVENT = 4 WATCH_XID = -1 PING_XID = -2 AUTH_XID = -4 -SET_WATCHES_XID = -8 CLOSE_RESPONSE = Close.type @@ -410,8 +408,6 @@ class ConnectionHandler(object): async_object.set(True) elif header.xid == WATCH_XID: self._read_watch_event(buffer, offset) - elif header.xid == SET_WATCHES_XID: - self.logger.log(BLATHER, 'Received SetWatches reply') else: self.logger.log(BLATHER, 'Reading for header %r', header) @@ -444,8 +440,6 @@ class ConnectionHandler(object): # Special case for auth packets if request.type == Auth.type: xid = AUTH_XID - elif request.type == SetWatches.type: - xid = SET_WATCHES_XID else: self._xid = (self._xid % 2147483647) + 1 xid = self._xid @@ -619,11 +613,6 @@ class ConnectionHandler(object): client._session_id or 0, client._session_passwd, client.read_only) - # save the client's last_zxid before it gets overwritten by the - # server's. - # we'll need this to reset watches via SetWatches further below. - last_zxid = client.last_zxid - connect_result, zxid = self._invoke( client._session_timeout / 1000.0, connect) @@ -663,15 +652,4 @@ class ConnectionHandler(object): if zxid: client.last_zxid = zxid - # TODO: separate exist from data watches - if client._data_watchers or client._child_watchers.keys(): - sw = SetWatches(last_zxid, - client._data_watchers.keys(), - client._data_watchers.keys(), - client._child_watchers.keys()) - zxid = self._invoke(connect_timeout / 1000.0, sw, - xid=SET_WATCHES_XID) - if zxid: - client.last_zxid = zxid - return read_timeout, connect_timeout |