From 554bfaf24e886ead6aad8c64289b77dea559bee6 Mon Sep 17 00:00:00 2001 From: Pavel Lobach Date: Sat, 14 Dec 2019 22:34:46 +0400 Subject: [PATCH] Change xid computation logic --- lib/ConnectionManager.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ConnectionManager.js b/lib/ConnectionManager.js index f402243..5e06805 100644 --- a/lib/ConnectionManager.js +++ b/lib/ConnectionManager.js @@ -614,8 +614,8 @@ ConnectionManager.prototype.onPacketQueueReadable = function () { header.type !== jute.OP_CODES.PING && header.type !== jute.OP_CODES.AUTH) { + this.xid = (this.xid % 2147483647) + 1; header.xid = this.xid; - this.xid += 1; // Only put requests that are not connect, ping and auth into // the pending queue.