Explicitly specify dice server port #3449
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
As discussed on the forum, there is a compatibility issue between the latest and current stable clients. #3277 set the
scheme
property value tohttps
for all MARTI servers. This property is persisted in a save game created by the latest pre-release, and thus read when the save game is opened by any other client.When the save game is opened in a stable client, the client attempts to open an HTTPS connection to the dice server using its default port of
80
. As this port is bound to the dice server's HTTP endpoint, the TLS connection fails.Alternatively, when the save game is opened in a pre-release client, the client attempts to open an HTTPS connection to the dice server using its default port of
-1
, which instructs the HTTP stack to use the standard default port for the specified scheme (443 in this case). Thus, the TLS connection succeeds.The fix is to explicitly specify the port as 443 in the dice server properties files. This ensures that save games created by a pre-release client will have the correct dice server port instead of relying on the default port configured in code. Thus, when such a save game is opened by a stable client, it will behave just as if it were opened by a pre-release client.
Testing
I created a PBF save game using
master
and verified I could reproduce the TLS error reported above when opening the save game in 9678. I then created a PBF save game using this branch and verified testing the dice server worked when opening the save game in 9678.Notes
This change can be reverted upon the next incompatible release.