mirror of
https://github.com/g4klx/DMRGateway
synced 2025-12-21 13:35:40 +08:00
Add optional log file rotation and UDP error handling.
This commit is contained in:
@@ -289,6 +289,12 @@ int CUDPSocket::read(unsigned char* buffer, unsigned int length, sockaddr_storag
|
||||
LogError("Error returned from recvfrom, err: %lu", ::GetLastError());
|
||||
#else
|
||||
LogError("Error returned from recvfrom, err: %d", errno);
|
||||
|
||||
if (len == -1 && errno == ENOTSOCK) {
|
||||
LogMessage("Re-opening UDP port on %u", m_port);
|
||||
close();
|
||||
open();
|
||||
}
|
||||
#endif
|
||||
return -1;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user