Skip to content

Commit fa60436

Browse files
committed
Updated to protocol 16
1 parent dde4547 commit fa60436

File tree

2 files changed

+14
-4
lines changed

2 files changed

+14
-4
lines changed

pynuodb/encodedsession.py

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -101,12 +101,22 @@ def open_database(self, db_name, parameters, cp):
101101
self.putNull().putString(cp.genClientKey())
102102

103103
self._exchangeMessages()
104-
version = self.getInt()
104+
protocolVersion = self.getInt()
105105
serverKey = self.getString()
106106
salt = self.getString()
107107
connectionDatabaseUUID = self.getUUID()
108-
connectionID = self.getInt()
109-
return version, serverKey, salt
108+
109+
if protocolVersion >= protocol.PROTOCOL_VERSION15 :
110+
connectionID = self.getInt()
111+
112+
if protocolVersion >= protocol.PROTOCOL_VERSION16 :
113+
effectivePlatformVersion = self.getInt()
114+
115+
if protocolVersion >= protocol.PROTOCOL_VERSION17 :
116+
connectedNodeId = self.getInt()
117+
maxNodes = self.getInt()
118+
119+
return protocolVersion, serverKey, salt
110120

111121
def check_auth(self):
112122
try:

pynuodb/protocol.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -350,4 +350,4 @@ def lookup_code(error_code):
350350
#
351351
# The current protocol version of THIS driver. The server will negotiate the lowest compatible version.
352352
#
353-
CURRENT_PROTOCOL_VERSION = PROTOCOL_VERSION15
353+
CURRENT_PROTOCOL_VERSION = PROTOCOL_VERSION16

0 commit comments

Comments
 (0)