Skip to content

Log WARN and no-op when we're trying to close an expired session that has been closed already

Description

With BotSession expiry enabled, there are certain cases in which we try to close a bot_session because it timed out, even though it has been closed for a different reason at approximately the same time as "expire_time", leading to a double invocation of close(bot_session) for that specific bot_session.

This doesn't cause any problems, but does show up in the logs as an uncaught exception.

Instead of letting the exception show up in the logs, this MR improves the log message to inform the user this is OK!

Edited by Marios Hadjimichael

Merge request reports