Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Manage dynamic sessions the same as common sessions for acceptor #661

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

haoyang1994
Copy link
Contributor

@haoyang1994 haoyang1994 commented Aug 8, 2024

In the current implementation, DynamicSession is unregistered when the connection is disconnected.

Since DynamicSession is unregistered, ErrUnknownSession will appear when the dynamic session is disconnected and the SendToTarget method is called.

DynamicSessions could be managed same as common sessions.

@haoyang1994 haoyang1994 marked this pull request as ready for review August 8, 2024 12:09
@haoyang1994 haoyang1994 marked this pull request as draft August 8, 2024 12:41
@haoyang1994 haoyang1994 marked this pull request as ready for review August 8, 2024 13:10
@ackleymi
Copy link
Member

ackleymi commented Aug 9, 2024

@haoyang1994 I think our test coverage for dynamic sessions is spotty/nonexistent, so I am hesitant to remove all the dynamic sessions handling logic without at least some new tests for them, see if you can add some scenarios to accepter_test.go

@haoyang1994
Copy link
Contributor Author

Hi @ackleymi , could you help to review the PR #662 ? I think the implementation in #662 is easier to understand and more user-friendly. If you agree with this perspective, I will close the current pull request.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants