BUG/MINOR: connections: Set idle_time before adding to idle list.
authorOlivier Houchard <cognet@ci0.org>
Sun, 22 Mar 2020 18:59:52 +0000 (19:59 +0100)
committerOlivier Houchard <cognet@ci0.org>
Sun, 22 Mar 2020 19:05:59 +0000 (20:05 +0100)
commitdbda31939dd3c775adb48ceeadbda89e42a25390
tree1c0d1d525a85f699e279de5d0b9f9390027b0c2c
parent3c49c1bd5ce1b47baa63d3c4058437e341389d98
BUG/MINOR: connections: Set idle_time before adding to idle list.

In srv_add_to_idle_list(), make sure we set the idle_time before we add
the connection to an idle list, not after, otherwise another thread may
grab it, set the idle_time to 0, only to have the original thread set it
back to now_ms.
This may have an impact, as in conn_free() we check idle_time to decide
if we should decrement the idle connection counters for the server.
include/proto/server.h