AlexStocks commented on a change in pull request #995:
URL: https://github.com/apache/dubbo-go/pull/995#discussion_r559094662
##########
File path: remoting/getty/listener.go
##########
@@ -85,15 +90,25 @@ func (h *RpcClientHandler) OnOpen(session getty.Session)
error {
// OnError the getty client session has errored, so remove the session from
the getty client session list
func (h *RpcClientHandler) OnError(session getty.Session, err error) {
logger.Infof("session{%s} got error{%v}, will be closed.",
session.Stat(), err)
+ h.tryDirectlyDelete()
h.conn.removeSession(session)
}
// OnClose close the session, remove it from the getty session list
func (h *RpcClientHandler) OnClose(session getty.Session) {
logger.Infof("session{%s} is closing......", session.Stat())
+ h.tryDirectlyDelete()
h.conn.removeSession(session)
}
+func (h *RpcClientHandler) tryDirectlyDelete() {
Review comment:
change this func name to tryDirectDelete or tryDeleteDirectly.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]