Commit 4cd6c610 authored by Paul Dardeau's avatar Paul Dardeau
Browse files

Added batch id support to BaseClient.

parent 257d5bf4
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -130,6 +130,7 @@ class BaseClient(object):
            self._socket.settimeout(self.socket_timeout)

            self._sequence = itertools.count()
            self._batch_id = itertools.count()
            self._closed = False
        except:
            self._socket = None
@@ -180,6 +181,7 @@ class BaseClient(object):
        self._socket = None
        self.connection_id = None
        self._sequence = itertools.count()
        self._batch_id = itertools.count()


    def update_header(self, command):
@@ -363,6 +365,9 @@ class BaseClient(object):
            else: done = True
        return m,cmd,value

    def next_batch_id(self):
        return self._batch_id.next()

    ### with statement support ###

    def __enter__(self):