Skip to content
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

Avoid race in datagram tests #185

Merged
merged 1 commit into from
Sep 4, 2023
Merged

Conversation

glbrntt
Copy link
Contributor

@glbrntt glbrntt commented Sep 4, 2023

Motivation:

The datagram tests use a handler which sets its event loop in channelRegistered. A function on the handler is called which relies on the EL being set. However, this can race: the function can be called before channelRegistered is called.

Modifications:

  • set the EL in handlerAdded

Result:

Fewer crashes

Motivation:

The datagram tests use a handler which sets its event loop in
`channelRegistered`. A function on the handler is called which relies on
the EL being set. However, this can race: the function can be called
before `channelRegistered` is called.

Modifications:

- set the EL in `handlerAdded`

Result:

Fewer crashes
@glbrntt glbrntt added the semver/none No version bump required. label Sep 4, 2023
@Lukasa Lukasa merged commit 251e9e7 into apple:main Sep 4, 2023
@glbrntt glbrntt deleted the gb-datagram-test branch September 4, 2023 13:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
semver/none No version bump required.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants