mirror of
https://github.com/g4klx/MMDVMHost.git
synced 2026-04-06 06:53:42 +00:00
Add optional log file rotation and UDP socket reopening.
This commit is contained in:
parent
34b3bc6166
commit
a0d60b894d
9 changed files with 64 additions and 8 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue