Open haoyang1994 opened 1 month ago
@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
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.
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.