Skip to content

Fail notification streams when the connection is lost#1323

Open
rpiaggio wants to merge 2 commits into
typelevel:mainfrom
rpiaggio:failed-connection-notify
Open

Fail notification streams when the connection is lost#1323
rpiaggio wants to merge 2 commits into
typelevel:mainfrom
rpiaggio:failed-connection-notify

Conversation

@rpiaggio

@rpiaggio rpiaggio commented Jul 3, 2026

Copy link
Copy Markdown

Session#channel(...).listen(...) (and Protocol#notifications) hanged silently forever if the session's connection dies.

The cause was in BufferedMessageSocket: the background read loop's failure handler only offered a NetworkError poison pill to the synchronous message queue, which raised on the next send/receive exchange. A LISTEN-only session never performs another exchange, and the notifications Topic was neither failed nor closed, so its subscribers waited forever.

This was found and fixed by Claude while looking for the root cause of subscribers not reporting changes on a running server and the reinitialization logic not being triggered.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant