Skip to content

Refactor network helpers (Take 3) #1774

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

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

Shourya742
Copy link
Contributor

@Shourya742 Shourya742 commented Jun 30, 2025

This PR combines the previously separate reader and writer tasks into a single tokio::select! block. It also adds a SIGTERM handling arm for graceful termination and introduces a writable_len method in the decoder to determine the required number of bytes to read from the socket buffer without altering the decoder's internal state. Makes reader cancellation safe on application layer, but stream is cancellation unsafe.

@Shourya742 Shourya742 marked this pull request as ready for review June 30, 2025 12:10
@lucasbalieiro
Copy link
Contributor

hey, still wrapping up the review here.

but with the changes in this PR, I managed to make the pool unkillable again, which brings back the zombie task issue we thought was fixed in #1764.

If you want to reproduce the zombie state, just follow the steps I shared in #1763 .

@Shourya742 Shourya742 marked this pull request as draft June 30, 2025 16:02
@Shourya742 Shourya742 mentioned this pull request Jul 9, 2025
@Shourya742 Shourya742 force-pushed the 2025-06-29-refactor-network-helpers branch from 7e96fab to 8cea487 Compare July 10, 2025 16:36
@Shourya742 Shourya742 force-pushed the 2025-06-29-refactor-network-helpers branch from 4a208d8 to 4588009 Compare July 10, 2025 16:49
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