mirror of
https://github.com/g4klx/MMDVMHost.git
synced 2026-01-09 10:00:25 +01:00
Handle a failing socket.
This commit is contained in:
parent
6df1187bac
commit
89d41261d9
|
|
@ -295,6 +295,12 @@ void CDMRIPSC::clock(unsigned int ms)
|
|||
in_addr address;
|
||||
unsigned int port;
|
||||
int length = m_socket.read(m_buffer, BUFFER_LENGTH, address, port);
|
||||
if (length < 0) {
|
||||
LogError("Socket has failed, retrying connection");
|
||||
close();
|
||||
open();
|
||||
return;
|
||||
}
|
||||
|
||||
// if (m_debug && length > 0)
|
||||
// CUtils::dump(1U, "IPSC Received", m_buffer, length);
|
||||
|
|
|
|||
Loading…
Reference in a new issue