林SO bc262743d7
fix(slack): log Socket Mode connect failures instead of dropping them (#5640)
* fix(slack): log Socket Mode connect failures instead of dropping them

SlackChannel.start() ran SocketModeClient.connect() through
loop.run_in_executor() and discarded the returned future. When the
connect raised (rejected app token, network error, TLS failure) the
exception was stored on a future nothing awaited, so the only trace was
asyncio's "Future exception was never retrieved" at garbage collection.
Meanwhile the channel had already logged "Slack channel started" and
reported itself running.

Route the executor call through _connect_socket_mode(), which logs the
failure with logger.exception() the way the Telegram and Discord channel
threads already do. The regression test injects a failing connect and
asserts the error reaches the channel logger.

* fix(slack): bind queued connect to its client

---------

Co-authored-by: Willem Jiang <willem.jiang@gmail.com>
2026-09-25 08:56:39 +08:00
..