better error handling

This commit is contained in:
Alexander Jacobsen 2026-07-18 01:50:12 +02:00
parent f8dfe27c57
commit 2737945b4c

View file

@ -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;
}
}