Skip to content

Commit 54c283d

Browse files
committed
Shut down non-datagram sockets that got I/O error
and also all non-continuous UNIX sockets are recycled after each use. This should fix spurious empty command that we are receiving on the non-continuous unix socket from time to time.
1 parent 8bab517 commit 54c283d

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/rtpp_command_async.c

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -384,7 +384,12 @@ rtpp_cmd_queue_run(void *arg)
384384
umode = RTPP_CTRL_ISDG(psp->rccs[i]->csock);
385385
rval = process_commands(cf, psp->pfds[i].fd, sptime, csp, umode, rtpp_stats_cf);
386386
}
387-
if (!RTPP_CTRL_ISDG(psp->rccs[i]->csock) && rval == -1) {
387+
/*
388+
* Shut down non-datagram sockets that got I/O error
389+
* and also all non-continuous UNIX sockets are recycled
390+
* after each use.
391+
*/
392+
if (!RTPP_CTRL_ISDG(psp->rccs[i]->csock) && (rval == -1 || RTPP_CTRL_ISUNIX(psp->rccs[i]->csock))) {
388393
closefd:
389394
if (psp->rccs[i]->csock->type == RTPC_STDIO && psp->rccs[i]->csock->exit_on_close != 0) {
390395
cf->stable->slowshutdown = 1;

0 commit comments

Comments
 (0)