Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
renonick87 opened this issue Feb 24, 2021 · 0 comments · Fixed by #388
Closed

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

renonick87 opened this issue Feb 24, 2021 · 0 comments · Fixed by #388
Labels
bug Something isn't working

Comments

@renonick87
Copy link
Contributor

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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants