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

Ignore IOError when closing connections #683

Merged
merged 3 commits into from
Dec 11, 2020
Merged

Conversation

fghzxm
Copy link
Contributor

@fghzxm fghzxm commented Nov 16, 2020

Closing client streams can throw IOError if the client connection has been reset by the peer, in which case we simply ignore the error and continue the cleanup.

Closing client streams can throw `IOError` if the client connection has been reset by the peer, in which case we simply ignore the error and continue the cleanup.
@fonsp
Copy link
Owner

fonsp commented Nov 16, 2020

Nice! Can you rename it to swallow_exception and swap the function arguments? https://docs.julialang.org/en/v1/manual/style-guide/#Write-functions-with-argument-ordering-similar-to-Julia-Base

IOError isn't exported by Base so we have to qualify it
@fghzxm
Copy link
Contributor Author

fghzxm commented Nov 16, 2020

Should be OK now, I hope there aren't any minor problems left

@fonsp fonsp merged commit 6c8a366 into fonsp:master Dec 11, 2020
@fonsp
Copy link
Owner

fonsp commented Dec 11, 2020

Awesome, thanks!

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.

None yet

2 participants