maptool
maptool copied to clipboard
[Bug]: Ill-timed heartbearts cause handshake failures
Describe the Bug
If a client is in the middle of a handhsake, and the time comes for a heartbeat to be sent to the server, the handshake will be corrupted by the heartbeat and the connection will fail.
To Reproduce
- Start a server on one machine
- On another machine, run MapTool under a debugger.
- Set a breakpoint at the top of
ClientHandshake.handleMessage
- Connect to the server
- Wait on the breakpoint for more than 20 seconds.
- Remove the breakpoint and continue.
- Set a breakpoint at the top of
- If all went well, the server will have received reported a
MESSAGETYPE_NOT_SET
and the client will be shown an error about incorrect passwords.
Expected Behaviour
Heartbeats should not be sent to the server during handshake. Handshakes complete very quickly after establishing a connection, and so there shouldn't even be an opportunity to lose the server unless something very drastic is happening.
Screenshots
No response
MapTool Info
develop
Desktop
Linux Mint 21.3
Additional Context
N/A