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 resource unavailable bug #815

Merged
merged 1 commit into from
May 30, 2018
Merged

Fix resource unavailable bug #815

merged 1 commit into from
May 30, 2018

Conversation

tcstewar
Copy link
Collaborator

At the moment, we don't handle a full socket gracefully. This mostly comes up if you have a large complex htmlview, which ends up breaking horribly once everything fills up.

I still need to put together a nice test, but here's a fix (this was reported in #813 )

@mention-bot
Copy link

@tcstewar, thanks for your PR! By analyzing the annotation information on this pull request, we identified @jgosmann, @studywolf and @hunse to be potential reviewers

@tcstewar tcstewar added the bug label Aug 10, 2016
@jgosmann
Copy link
Collaborator

I think the code could potentially be simplified by doing always a select call first and not catching any exceptions.

As for a good test ... we could open up a websocket connection, fill it up and check that no exception is raised. It's a little bit complicated to implement because to threads have to be coordinated ... not sure if it's worth the hassle.

@tcstewar
Copy link
Collaborator Author

I think the code could potentially be simplified by doing always a select call first and not catching any exceptions.

Oooo... also a very good idea. Much much cleaner, and seems to work well. :)

@tcstewar
Copy link
Collaborator Author

tcstewar commented May 30, 2018

Since @jgosmann suggested the entire contents of this one-line fix, I'm going to act as the reviewer for it, even though I made the PR. Thank you @jgosmann , it looks good to me (and I just checked that it still fixes things when the HtmlNode has lots of content)

@tcstewar tcstewar merged commit b3dc744 into master May 30, 2018
@tcstewar tcstewar deleted the fix-resource-unavail branch May 30, 2018 22:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

Successfully merging this pull request may close these issues.

3 participants