]> 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 08:57:16 +0000 (10:57 +0200)
commit6c5ff9421875a1fcdfb8f03ac01afe292075d8d2
treed778c6f8c64049e92bae97b7e4ee353adbd9c6d6
parenta63ac933bb9116d374ca00cacf9444f8ff5f2cce
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.
CHANGES
bin/tests/system/statistics/tests.sh
doc/notes/notes-current.rst
lib/isc/netmgr/tcp.c