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

Fix a bug with session id in on_disconnect() trigger.

https://bugs.launchpad.net/tarantool/+bug/1160789

When multiple sessions get disconnected at the same
time, the same fiber is running all disconnect triggers.
This fiber's sid was  not changed between trigger invocations,
and on_disconnect() triggrer of the next disconnected
session would see not its own session id in box.session.id(),
but the previous session's session id.

The fix is to correctly set box.session.id() before handling
any iproto request.
In on_connect() request, sid is 0, but soon it is
reset in session_create().

No test case since the bug requires that there is a full
libev queue, so that multiple on_disconnect() triggers
fire in the same loop.
parent 0c9ef5f4
No related branches found
No related tags found
No related merge requests found
Loading
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