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

Fix #1430 by detecting case when client connect/disconnects before me… #1442

Merged
merged 1 commit into from
Dec 14, 2016

Conversation

mattrjacobs
Copy link
Contributor

…trics start getting emitted

@mattrjacobs mattrjacobs merged commit 11ca011 into Netflix:master Dec 14, 2016
@mattrjacobs mattrjacobs deleted the fix-1430 branch December 14, 2016 22:52
writer.print("ping: \n\n");
// explicitly check for client disconnect - PrintWriter does not throw exceptions
if (writer.checkError()) {
throw new IOException("io error");

Choose a reason for hiding this comment

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

To avoid the cost of creating and throwing the exception, can you call moreDataWillBeSent.set(false); instead?

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