chiark / gitweb /
socket: don't fail the socket on ENOTCONN
authorMichal Schmidt <mschmidt@redhat.com>
Fri, 20 Jan 2012 22:44:22 +0000 (23:44 +0100)
committerMichal Schmidt <mschmidt@redhat.com>
Fri, 20 Jan 2012 22:57:54 +0000 (23:57 +0100)
commit1a710b430b7e5fa036ee5c03e14e60f725df5baf
tree903715a60ac406e85493edafcc3720fd900ebc76
parent229b5d55f620704d62b91d824f429a6cf07e070c
socket: don't fail the socket on ENOTCONN

Albert Strasheim reported a socket unit with Accept=yes was failing
sometimes.
getpeername() returns ENOTCONN if the connection was killed by TCP RST.
The socket unit must not fail when it happens.

Reproducer available at:
https://bugzilla.redhat.com/show_bug.cgi?id=783344
src/socket.c