zeroc-ice / ice

All-in-one solution for creating networked applications with RPC, pub/sub, server deployment, and more.
https://zeroc.com
GNU General Public License v2.0
2.03k stars 592 forks source link

Remove Glacier2 SessionThread #1506

Closed bernardnormier closed 4 months ago

bernardnormier commented 11 months ago

Glacier2's SessionRouter starts a "session thread" when the session timeout is > 0.

This background thread destroys sessions that have been idle for too long: https://github.com/zeroc-ice/ice/blob/badafe8b848181a720ab96b48da6abc170fd918c/cpp/src/Glacier2/SessionRouterI.cpp#L1331 https://github.com/zeroc-ice/ice/blob/badafe8b848181a720ab96b48da6abc170fd918c/cpp/src/Glacier2/SessionRouterI.cpp#L1074

I believe this code is redundant: when a connection/session is not used for > session timeout, it's reliably destroyed via ACM, so we don't need this extra thread. Worse, starting this thread when session timeout is > 0 is confusing since it gives the impression configuring session timeout instead of ACM has a special behavior.

See also #642.

bernardnormier commented 4 months ago

This was fixed by an earlier PR.