@matrixai/ws
Advanced tools
Comparing version 1.1.4 to 1.1.5
@@ -46,2 +46,6 @@ /// <reference types="node" /> | ||
readonly connectionId: number; | ||
/** | ||
* Used to track streamIds that have already been used. | ||
*/ | ||
protected usedIdSet: Set<StreamId>; | ||
protected logger: Logger; | ||
@@ -48,0 +52,0 @@ protected config: WebSocketConfig; |
@@ -88,2 +88,6 @@ "use strict"; | ||
streamMap = new Map(); | ||
/** | ||
* Used to track streamIds that have already been used. | ||
*/ | ||
usedIdSet = new Set(); | ||
logger; | ||
@@ -274,2 +278,10 @@ /** | ||
if (stream == null) { | ||
// FIXME: tempfix for preventing dead stream re-creation | ||
if (this.usedIdSet.has(streamId)) { | ||
// Silently ignore the message | ||
return; | ||
} | ||
else { | ||
this.usedIdSet.add(streamId); | ||
} | ||
// Because the stream code is 16 bits, and Ack is only the right-most bit set when encoded by big-endian, | ||
@@ -276,0 +288,0 @@ // we can assume that the second byte of the StreamMessageType.Ack will look the same as if it were encoded in a u8 |
{ | ||
"name": "@matrixai/ws", | ||
"version": "1.1.4", | ||
"version": "1.1.5", | ||
"author": "Matrix AI", | ||
@@ -5,0 +5,0 @@ "contributors": [ |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
291278
4689