Skip to content

Client invalid state exception when connection times out #389

@zaphoyd

Description

@zaphoyd

Issue posted to the mailing list by Geoff:

This might be related to #361

Client connection behavior during timeouts / high load needs some additional testing.

I think I am also seeing this problem.

m_state: state::closed
m_local_close_code: 1006 (abnormal_close)
m_local_close_reason: "The opening handshake timed out"

In my case the server is under high load explaining the timeout. The client throws the "invalid state" exception and exits. The abnormal_close description suggests this state is not a result of messages passed between client/server. Rather the client is giving up on the server and initiating the closing of the connection. So as far as I can work out, in this scenario it is possible to receive the handshake response while in the closed state.

In my opinion it would be better for the state machine to ignore the message rather than terminate.

A workaround is to try and avoid the situation by making the timeouts longer.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions