Skip to content

fix(network): wake publisher after draining host channel#930

Open
chiehwangs wants to merge 3 commits into
superradcompany:mainfrom
chiehwangs:fix/published-port-drain-wake-timing
Open

fix(network): wake publisher after draining host channel#930
chiehwangs wants to merge 3 commits into
superradcompany:mainfrom
chiehwangs:fix/published-port-drain-wake-timing

Conversation

@chiehwangs
Copy link
Copy Markdown
Contributor

Description

Published-port responses can stall behind a slow host-side client because the inbound relay only wakes the poll loop after the host socket write completes.

Root Cause

Receiving from to_host_rx frees capacity for more smoltcp-to-host data, but the wake happened after write_all().await. When that write blocks, the poll loop is not notified that it can refill the channel.

Fix

Wake the poll loop immediately after draining to_host_rx, before awaiting the host socket write, and add a regression test that covers the blocked-write timing.

## Description

Published-port responses can stall behind a slow host-side client because the inbound relay only wakes the poll loop after the host socket write completes.

## Root Cause

Receiving from `to_host_rx` frees capacity for more smoltcp-to-host data, but the wake happened after `write_all().await`. When that write blocks, the poll loop is not notified that it can refill the channel.

## Fix

Wake the poll loop immediately after draining `to_host_rx`, before awaiting the host socket write, and add a regression test that covers the blocked-write timing.
Create a no-op commit to request a fresh GitHub Actions run after the previous self-hosted runner failure.
Create another no-op commit to request a fresh GitHub Actions run without changing code.
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