Skip to content

Do not ignore socket errors#3694

Merged
dsiganos merged 2 commits intonanocurrency:developfrom
dsiganos:do_not_ignore_socket_errors
Jan 31, 2022
Merged

Do not ignore socket errors#3694
dsiganos merged 2 commits intonanocurrency:developfrom
dsiganos:do_not_ignore_socket_errors

Conversation

@dsiganos
Copy link
Copy Markdown
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
Copy Markdown
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.

@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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants