xP: fix command sequence number generation
This commit is contained in:
		@@ -110,8 +110,9 @@ class RelayRpc extends EventTarget {
 | 
			
		||||
		if (typeof params !== 'object')
 | 
			
		||||
			throw "Method parameters must be an object"
 | 
			
		||||
 | 
			
		||||
		// Left shifts in Javascript convert to a 32-bit signed number.
 | 
			
		||||
		let seq = ++this.commandSeq
 | 
			
		||||
		if (seq >= 1 << 32)
 | 
			
		||||
		if ((seq << 0) != seq)
 | 
			
		||||
			seq = this.commandSeq = 0
 | 
			
		||||
 | 
			
		||||
		this.ws.send(JSON.stringify({commandSeq: seq, data: params}))
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user