Skip to content
Snippets Groups Projects
Commit b3f82caf authored by Konstantin Osipov's avatar Konstantin Osipov
Browse files

iproto: clarify why we need to reset session->fd before running triggers

parent d68050b9
No related branches found
No related tags found
No related merge requests found
......@@ -951,6 +951,10 @@ tx_process_disconnect(struct cmsg *m)
struct iproto_connection *con = msg->connection;
if (con->session) {
tx_fiber_init(con->session, 0);
/*
* The socket is already closed in iproto thread,
* prevent box.session.peer() from using it.
*/
con->session->fd = -1;
if (! rlist_empty(&session_on_disconnect))
session_run_on_disconnect_triggers(con->session);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment