Better client connection state #749
Closed
passaport
started this conversation in
Feature Request
Replies: 2 comments
-
This might be doable without causing any breaks. I think we could make the enum a flags and if state is stopped we could add the additional flags to the enum. The only serious impact I could see this having is on user code where they check for state == stopped, and that would be false if the other flags existed. |
Beta Was this translation helpful? Give feedback.
0 replies
-
I checked into this and it's unfortunately not possible without causing breaks elsewhere. This has been added to the V5 potential changes on the road map. I will be closing out this discussion. It will be re-opened when V5 is nearing. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello,
I have a suggestion to improve how the network connection state is represented for the client. Currently, it’s defined as an enum with four states, but I believe these states don’t fully capture all possible scenarios.
For example, if the client attempts to connect to the server and fails, the client transitions to the 'Stopping' and 'Stopped' states. However, these states don't differentiate whether the disconnection was due to a failed connection attempt or because the server disconnected the client.
To address this, I recommend adding a string field to indicate the specific reason for the disconnection. This string could be set by the network manager when a connection fails or by the server if it initiates the disconnection. This would provide clearer insights into why the disconnection occurred.
Beta Was this translation helpful? Give feedback.
All reactions