Skip to content
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

Error writing to upstream #161

Merged
merged 10 commits into from
May 9, 2024
Merged

Error writing to upstream #161

merged 10 commits into from
May 9, 2024

Conversation

viktorerlingsson
Copy link
Member

@viktorerlingsson viktorerlingsson commented May 7, 2024

WIP:
This suppress some errors that shouldnt be logged when a channel is already closed.
Yields fiber read/write loops to make sure we can both publish and consume without locking.

Adresses some parts of #157

viktorerlingsson and others added 10 commits May 7, 2024 18:43
…in loops to make sure we both publish and consume
Is even more fair when there are many connections
For instance, when a client A sends Pub/Headers frames but not the Body
frame and then exits, then when the next client tries to publish the
upstream servers is not expected a Publish frame but is waiting for that
Body frame that will never come.
@carlhoerberg carlhoerberg marked this pull request as ready for review May 9, 2024 08:38
@carlhoerberg
Copy link
Member

No channels are safe for reuse, even publish only channels might be in a bad state if not all Pub/Header/Body frames has been sent by the client before disconnect.

@carlhoerberg
Copy link
Member

Fiber yield every 4096 frame to balance full throttle connections.

@carlhoerberg carlhoerberg merged commit 43079e4 into main May 9, 2024
4 checks passed
@carlhoerberg carlhoerberg deleted the 157-fixes branch May 9, 2024 08:47
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