Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Do not ignore socket errors #3694

Merged
merged 2 commits into from
Jan 31, 2022

Conversation

dsiganos
Copy link
Contributor

We were not checking the result of the connect, send, recv operations.
We treated failed operations as successful, which
gave at least wrong stats and possibly other minor problems too.

Added counters for tcp connect, read, write errors.

We were not checking the result of the connect, send, recv operations.
We assumed that they were successful and treated them as successful, which
gave at least wrong stats and possibly other minor problems too.
It seems like a good idea to have counters counting how many tcp errors
we get for tcp read, write and connect.
@zhyatt zhyatt added the bug label Jan 28, 2022
@zhyatt zhyatt added this to the V24.0 milestone Jan 28, 2022
Copy link
Contributor

@thsfs thsfs left a comment

Choose a reason for hiding this comment

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

The fix is ok for detecting the socket error and letting the it to get closed, but it seems the stats are getting wrongly registered in the nano::socket::checkup() function.

nano/node/socket.cpp Show resolved Hide resolved
nano/node/socket.cpp Show resolved Hide resolved
nano/node/socket.cpp Show resolved Hide resolved
@dsiganos dsiganos merged commit 1cf9d35 into nanocurrency:develop Jan 31, 2022
@dsiganos dsiganos deleted the do_not_ignore_socket_errors branch January 31, 2022 18:26
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants