diff --git a/lib/js/src/protocol/_SdlProtocolBase.js b/lib/js/src/protocol/_SdlProtocolBase.js index 4fbbe6d4..85194bed 100644 --- a/lib/js/src/protocol/_SdlProtocolBase.js +++ b/lib/js/src/protocol/_SdlProtocolBase.js @@ -216,27 +216,27 @@ class _SdlProtocolBase { */ _setVersion (version) { if (version > 5) { - this._protocolVersion = new Version('5.1.0'); // protect for future, proxy only supports v5 or lower + this._protocolVersion = new Version(5, 0, 0); // protect for future, proxy only supports v5 or lower this.headerSize = this.constructor.V2_HEADER_SIZE; this._mtus[_ServiceType.RPC] = this.constructor.V3_V4_MTU_SIZE; } else if (version === 5) { - this._protocolVersion = new Version('5.0.0'); + this._protocolVersion = new Version(5, 0, 0); this.headerSize = this.constructor.V2_HEADER_SIZE; this._mtus[_ServiceType.RPC] = this.constructor.V3_V4_MTU_SIZE; } else if (version === 4) { - this._protocolVersion = new Version('4.0.0'); + this._protocolVersion = new Version(4, 0, 0); this.headerSize = this.constructor.V2_HEADER_SIZE; this._mtus[_ServiceType.RPC] = this.constructor.V3_V4_MTU_SIZE; // versions 4 supports 128k MTU } else if (version === 3) { - this._protocolVersion = new Version('3.0.0'); + this._protocolVersion = new Version(3, 0, 0); this.headerSize = this.constructor.V2_HEADER_SIZE; this._mtus[_ServiceType.RPC] = this.constructor.V3_V4_MTU_SIZE; // versions 3 supports 128k MTU } else if (version === 2) { - this._protocolVersion = new Version('2.0.0'); + this._protocolVersion = new Version(2, 0, 0); this.headerSize = this.constructor.V2_HEADER_SIZE; this._mtus[_ServiceType.RPC] = this.constructor.V1_V2_MTU_SIZE - this.headerSize; } else if (version === 1) { - this._protocolVersion = new Version('1.0.0'); + this._protocolVersion = new Version(1, 0, 0); this.headerSize = this.constructor.V1_HEADER_SIZE; this._mtus[_ServiceType.RPC] = this.constructor.V1_V2_MTU_SIZE - this.headerSize; }