Commit 78de6efc authored by Ignacio Corderi's avatar Ignacio Corderi
Browse files

Moved handshake to NOOP to avoid NOT_PERMITTED error on identities without GETLOG permission

parent dead8421
Loading
Loading
Loading
Loading
+1 −5
Original line number Diff line number Diff line
@@ -133,15 +133,11 @@ class BaseClient(object):

    def _handshake(self):
        # Connection id handshake
        # any message works, a NOOP should be slighly faster
        # might as well get something back
        h,v = operations.GetLog.build([common.LogTypes.CONFIGURATION])
        h,v = operations.Noop.build()
        self.update_header(h)
        self.network_send(h,v)
        h,v = self.network_recv()
        operations._check_status(h)
        log = operations.GetLog.parse(h,v)
        self.config = log.configuration

    def has_data_available(self):
        tmp = self._socket.recv(1, socket.MSG_PEEK)