Skip to content

Avoid exclusivity conflict in DatagramContext - #146

Merged
aryan-25 merged 1 commit into
swift-server:mainfrom
aryan-25:avoid-exclusivity-conflict
Oct 8, 2026
Merged

aryan-25 merged 1 commit into
swift-server:mainfrom
aryan-25:avoid-exclusivity-conflict

Conversation

@aryan-25

@aryan-25 aryan-25 commented Oct 8, 2026

Copy link
Copy Markdown
Collaborator

Motivation

DatagramContext currently completes the negotiation promise inside its own mutating methods. The promise's callbacks run synchronously and call back into register/deregister on the manager. This results in an exclusivity violation crash for streams opened before SETTINGS. We should fix this.

Modifications

Updated DatagramContext to hand over the promise to the manager handler, which completes it once the mutating access has ended.

Result

Streams opened before SETTINGS can register and deregister from the datagram negotiation callbacks without crashing.

@aryan-25 aryan-25 added the 🔨 semver/patch No public API change. label Oct 8, 2026
@aryan-25
aryan-25 merged commit 0b8f169 into swift-server:main Oct 8, 2026
22 of 27 checks passed
@aryan-25
aryan-25 deleted the avoid-exclusivity-conflict branch October 8, 2026 12:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🔨 semver/patch No public API change.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants