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.
问题:
return 前不将 session 状态变更为 logon,当后续逻辑发生 error return 时,会让 session 一直处于 latent 状态,并且不会再次发起连接。
解决方式:
当 fix session 处于 latent 状态,并且准备发起 Connect 时,说明 TCP 连接已经建立,进行后续可能 error return 的逻辑之前,先将 session 状态变更为 logon,借由 logon 超时的回调,解决上述问题。并且此时 TCP 已经建立连接,变更为 logon 有其业务合理性。