Skip to content

[JSONRPC] Do not exit until outstanding I/O has finished #254

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

Merged
merged 1 commit into from
Mar 10, 2020

Conversation

benlangmuir
Copy link
Contributor

Specifically, we care that all outstanding writes are finished before we call the close handler, because otherwise we may (a) send corrupted output during shutdown, or (b) drop notifications and replies sent during the shutdown process. The former is an issue for clients that are not robust about parse failures, and the latter is an issue for reproducibility and robustness during testing/debugging - in particular, we have some integration tests that send data without waiting for individual replies and they need to finish outstanding replies before exiting.

rdar://60159448

Specifically, we care that all outstanding **writes** are finished
before we call the close handler, because otherwise we may (a) send
corrupted output during shutdown, or (b) drop notifications and replies
sent during the shutdown process.  The former is a potential issue for
clients that are not robust about parse failures, and the latter is an
issue for reproducibility and robustness during testing/debugging - in
particular, we have some integration tests that send data without
waiting for individual replies and they need to finish outstanding
replies before exiting.

rdar://60159448
@benlangmuir
Copy link
Contributor Author

@swift-ci please test

@benlangmuir benlangmuir merged commit 7d18d3b into swiftlang:master Mar 10, 2020
@benlangmuir benlangmuir deleted the wait-io branch March 10, 2020 20:13
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