let the on_close procedure the same with ObDisconnect::run

This commit is contained in:
obdev
2023-03-07 13:41:03 +00:00
committed by ob-robot
parent 71cc2166d8
commit b010a4e186
2 changed files with 9 additions and 9 deletions

View File

@ -185,10 +185,10 @@ void ObSMConnectionCallback::destroy(ObSMConnection& conn)
}
// free session locally
if (OB_FAIL(ret)) {
int tmp_ret = GCTX.session_mgr_->free_session(ctx);
if (OB_UNLIKELY(OB_SUCCESS != tmp_ret)) {
LOG_WARN("free session fail", K(ctx), K(tmp_ret));
ret = tmp_ret;
ObMPDisconnect disconnect_processor(ctx);
rpc::frame::ObReqProcessor *processor = static_cast<rpc::frame::ObReqProcessor *>(&disconnect_processor);
if (OB_FAIL(processor->run())) {
LOG_WARN("free session fail", K(ctx));
} else {
LOG_INFO("free session successfully", K(conn.sessid_),
"proxy_sessid", conn.proxy_sessid_, K(ctx));

View File

@ -226,10 +226,10 @@ int ObSMHandler::on_close(easy_connection_t *c)
}
// free session locally
if (OB_FAIL(ret)) {
int tmp_ret = gctx_.session_mgr_->free_session(ctx);
if (OB_UNLIKELY(OB_SUCCESS != tmp_ret)) {
LOG_WARN("free session fail", K(ctx), K(tmp_ret));
ret = tmp_ret;
ObMPDisconnect disconnect_processor(ctx);
rpc::frame::ObReqProcessor *processor = static_cast<rpc::frame::ObReqProcessor *>(&disconnect_processor);
if (OB_FAIL(processor->run())) {
LOG_WARN("free session fail", K(ctx));
} else {
LOG_INFO("free session successfully", K(conn->sessid_),
"proxy_sessid", conn->proxy_sessid_, K(ctx));