Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions lib/js/src/protocol/_SdlProtocolBase.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down