Reduce sleep time on error

This commit is contained in:
Maschell 2022-10-07 14:22:58 +02:00
parent 3f0d70cc4c
commit c6e9c29cd7

View File

@ -35,8 +35,10 @@ BOOL BackgroundThread::whileLoop() {
} else { } else {
this->serverSocket = create_server(PORT); this->serverSocket = create_server(PORT);
if (this->serverSocket < 0) { if (this->serverSocket < 0) {
DEBUG_FUNCTION_LINE_WARN("Creating a new ftp server failed. Trying again in 5 seconds."); if (errno != EBUSY) {
OSSleepTicks(OSSecondsToTicks(5)); DEBUG_FUNCTION_LINE_WARN("Creating server failed: %d", errno);
}
OSSleepTicks(OSMillisecondsToTicks(10));
} }
} }
return true; return true;