Skip to content

Commit a2d997e

Browse files
committed
Ignore last session info with a commit sequence of 0
1 parent 6226a07 commit a2d997e

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

pynuodb/encodedsession.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -283,7 +283,8 @@ def send_close(self):
283283
def __set_dbinfo(self, sid, txid, seqid):
284284
# type: (int, int, int) -> None
285285
with EncodedSession.__dblock:
286-
lci = self.__dbinfo.get(sid, (-1, -1))
286+
# 0 is an invalid sequence ID
287+
lci = self.__dbinfo.get(sid, (0, 0))
287288
if seqid > lci[1]:
288289
self.__dbinfo[sid] = (txid, seqid)
289290

0 commit comments

Comments
 (0)