Skip to content

_SdlProtocolBase sets the wrong protocol version on the first packet received #387

Closed
@renonick87

Description

@renonick87

Bug Report

The SdlProtocolBase sets its major protocol version based on the header of the first packet it receives from core. However in the case where the major version is > 5, the SdlProtocolBase was incorrectly attempting to set the minor version as well.

Reproduction Steps
  1. SdlProtocolBase's _setVersion method uses 5.1.0 but it should only use major versions.
Expected Behavior

The protocol version should be set to v5.0.0.

Test Case, Sample Code, and / or Example App
  1. Add a console.log to check the protocol version in the SdlProtocolBase's _handlePacketReceived method:
if (this._protocolVersion === null || this._protocolVersion.getMajor() === 1) {
            this._setVersion(sdlPacket.getVersion());
            console.log(this._protocolVersion);
        }
  1. The protocol version will be logged when the first packet is received from core.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions