better error handling
This commit is contained in:
parent
f8dfe27c57
commit
2737945b4c
1 changed files with 8 additions and 2 deletions
10
pixelflut.c
10
pixelflut.c
|
|
@ -231,15 +231,21 @@ static void *worker_main(void *arg)
|
|||
/* Transient back-pressure. Back off briefly so the queue
|
||||
* drains (rather than spinning on failing syscalls), then
|
||||
* resend the same batch - no need to repaint. */
|
||||
usleep(200);
|
||||
usleep(100);
|
||||
continue;
|
||||
case ECONNREFUSED:
|
||||
break; /* stale ICMP on connected UDP; repaint and retry */
|
||||
case EHOSTUNREACH: /* display down / IPv6 ND unresolved */
|
||||
case ENETUNREACH:
|
||||
case EHOSTDOWN:
|
||||
case ENETDOWN:
|
||||
usleep(100000);
|
||||
break;
|
||||
default:
|
||||
perror("sendmmsg");
|
||||
break;
|
||||
}
|
||||
break; /* ECONNREFUSED / unexpected: stop, repaint, retry */
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue