-
Notifications
You must be signed in to change notification settings - Fork 312
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(java-client): fix
Negotiation failed
after a session with authe…
…ntication enabled is closed (#2132) Resolve #2133. After the session with authentication enabled to remote server is closed(e.g. the server is killed), the flag(i.e. `authSucceed`) marking whether the session has been authenticated is still kept `true`. Afterwards, while trying to creating another new connection to the same remote server for this session, some requests would be pending before it is connected successfully. Once the session is connected, the pending requests would be sent to the remote server. Typically, the first element of the pending queue would be a non-negotiation request(`query_cfg_request` to the meta server for example), and the second one would be a negotiation request. Normally, the non-negotiation request would be moved to another pending queue for authentication; however, since the flag still marks that the session has been authenticated successfully, the non-negotiation request would be directed to the remote server which would never reply to the client since the server think that the negotiation has not been launched. However, since the client has actually launched the negotiation, it would close the session due to timeout or having not receiving response from the server for long time. Therefore, the above process would repeat again. To fix this problem, the flag should be reset after the session is closed. Then, the client would never send non-negotiation requests before the negotiation with the server becomes successful.
- Loading branch information
Showing
3 changed files
with
303 additions
and
169 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.