]> git.ipfire.org Git - thirdparty/bind9.git/commit
Don't increment network error stats on UV_EOF
authorMatthijs Mekking <matthijs@isc.org>
Tue, 20 Oct 2020 08:57:16 +0000 (10:57 +0200)
committerMatthijs Mekking <matthijs@isc.org>
Tue, 20 Oct 2020 14:05:09 +0000 (14:05 +0000)
commit5c0b5b64e57e665e7529efd003307dc8aa5039b0
tree0661b563e1b72f83ca264b447cc94ddfa5f62da9
parentb4ad8cb93d92aa4eb8936ad2849e351bb6b08cd5
Don't increment network error stats on UV_EOF

When networking statistics was added to the netmgr (in commit
5234a8e00a6ae1df738020f27544594ccb8d5215), two lines were added that
increment the 'STATID_RECVFAIL' statistic: One if 'uv_read_start'
fails and one at the end of the 'read_cb'.  The latter happens
if 'nread < 0'.

According to the libuv documentation, I/O read callbacks (such as for
files and sockets) are passed a parameter 'nread'. If 'nread' is less
than 0, there was an error and 'UV_EOF' is the end of file error, which
you may want to handle differently.

In other words, we should not treat EOF as a RECVFAIL error.

(cherry picked from commit 6c5ff9421875a1fcdfb8f03ac01afe292075d8d2)
CHANGES
bin/tests/system/statistics/tests.sh
doc/notes/notes-current.rst
lib/isc/netmgr/tcp.c