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 {
this->serverSocket = create_server(PORT);
if (this->serverSocket < 0) {
DEBUG_FUNCTION_LINE_WARN("Creating a new ftp server failed. Trying again in 5 seconds.");
OSSleepTicks(OSSecondsToTicks(5));
if (errno != EBUSY) {
DEBUG_FUNCTION_LINE_WARN("Creating server failed: %d", errno);
}
OSSleepTicks(OSMillisecondsToTicks(10));
}
}
return true;