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

Error checking in nagle and quickack #32292

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

mateuszbaran
Copy link
Contributor

As suggested here: #31924 (comment) I've added error checking to nagle. The error checking in quickack is modified to take into account value of the enable argument.

r = ccall(:uv_tcp_nodelay, Cint, (Ptr{Cvoid}, Cint), sock.handle, Cint(!enable))
if r < 0
enable_disable = ifelse(enable, "enable", "disable")
@warn "Cannot $(enable_disable) Nagle's algorithm ( Error: $(Libc.strerror(Libc.errno())) )" maxlog=1
Copy link
Member

Choose a reason for hiding this comment

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

Having spaces inside of parens like this is not standard in Julia error messages. Maybe have the error message on a new line?

Copy link
Member

Choose a reason for hiding this comment

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

It would be more standard now to use the exception kwarg

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I've changed it, the error is now printed using the exception kwarg.

@mateuszbaran mateuszbaran force-pushed the mbaran/nagle-error-checking branch from 40763ea to 57896e0 Compare June 12, 2019 11:03
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.

3 participants