When the host-side unix socket peer does shutdown(SHUT_WR), read() returns 0 on the stream. Previously this was treated as a full connection closure, sending VSOCK_OP_SHUTDOWN with both SHUTDOWN_RCV and SHUTDOWN_SEND flags and arming the kill timer. This prevented the guest from sending any further data back through the still-writable socket. Change LocalClosed to carry a bool indicating whether receiving from the guest is also shut down. On stream EOF, only set SHUTDOWN_SEND (host won't send anymore) and transition to LocalClosed(false), keeping the connection alive for guest-to-host data flow. The connection fully closes when the guest also sends SHUTDOWN with SHUTDOWN_SEND, or sends RST. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| src | ||
| build.rs | ||
| Cargo.toml | ||