Skip to content

Prevent connection from closing when opening channels without write mode #106

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
May 16, 2025

Conversation

diogob
Copy link
Owner

@diogob diogob commented May 14, 2025

It seems that without the notifySession being open in the middleware, the runtime detects the waiting on the MVar as an infinite wait. Which although true, it's useful to relay read messages and the connection will be closed by warp when the client disconnects.

Using a threadDelay to wait fixes the issue and should not have a big impact on resources.

This should fix [#105]

… the runtime detects the waiting on the MVar as an infinite wait. Which although true, it's useful to relay read messages and the connection will be closed by warp when the client disconects.

This should fix [#105]
@diogob
Copy link
Owner Author

diogob commented May 14, 2025

@wolfgangwalther this PR seems to be a good fix for #105. If you could test this on your end that would be much appreciated. In the meantime I'll just add some test for read-only channels.

@wolfgangwalther
Copy link
Contributor

We tested it and it works :)

Thanks a lot for the quick fix!

@diogob diogob marked this pull request as ready for review May 15, 2025 23:20
@diogob diogob merged commit 4f32cbd into master May 16, 2025
1 check passed
@diogob diogob deleted the fix-connection-closing-when-no-write-mode-is-present branch May 16, 2025 00:48
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.

2 participants