Skip to content

clients: explicitly shutdown connection when killing client#777

Merged
mahkoh merged 1 commit intomasterfrom
jorth/shutdown-connection
Mar 6, 2026
Merged

clients: explicitly shutdown connection when killing client#777
mahkoh merged 1 commit intomasterfrom
jorth/shutdown-connection

Conversation

@mahkoh
Copy link
Owner

@mahkoh mahkoh commented Mar 6, 2026

No description provided.

Copilot AI review requested due to automatic review settings March 6, 2026 14:52
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR ensures that when a client is terminated (e.g., via kill/shutdown paths that drop the client tasks), the underlying Wayland connection is explicitly shutdown() to forcefully unblock pending read/write operations and accelerate teardown.

Changes:

  • Add a drop-guard in the receive task to shutdown(fd, SHUT_RD) when the receive future is dropped.
  • Add a drop-guard in the send task to shutdown(fd, SHUT_WR) when the send future is dropped.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@mahkoh mahkoh merged commit 893be82 into master Mar 6, 2026
12 checks passed
@mahkoh mahkoh deleted the jorth/shutdown-connection branch March 6, 2026 14:56
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