Backend ignore of SIGPIPE. This occurs if client quits unexpectedly over the UNIX socket.

This is a timing issue but occurs more frequently in large RESTCONF messgaes.
This commit is contained in:
Olof hagsand 2022-02-14 20:53:31 +01:00
parent b7c0113331
commit 78bdc4eaca
3 changed files with 12 additions and 1 deletions

View file

@ -278,6 +278,8 @@ atomicio(ssize_t (*fn) (int, void *, size_t),
continue;
else if (errno == ECONNRESET)/* Connection reset by peer */
res = 0;
else if (errno == EPIPE) /* Client shutdown */
res = 0;
/* SIGPIPE if client is killed */
case 0: /* fall thru */
return (res);