mirror of
https://github.com/g4klx/DAPNETGateway.git
synced 2026-08-26 12:32:45 -04:00
Cleaned up debug msgs & version bump
This commit is contained in:
parent
7b2ead2631
commit
7d9e321edb
3 changed files with 6 additions and 17 deletions
|
|
@ -280,20 +280,7 @@ int CDAPNETGateway::run()
|
|||
bool ok = m_dapnetNetwork->read();
|
||||
if (!ok)
|
||||
recover();
|
||||
/*
|
||||
if (!ok) {
|
||||
int i = 0;
|
||||
const unsigned int backoff[] = {
|
||||
2000U, 4000U, 8000U, 10000U, 20000U,
|
||||
60000U, 120000U, 240000U, 480000U, 600000U };
|
||||
while (i<10) {
|
||||
CThread::sleep(backoff[i]);
|
||||
recover();
|
||||
if (i < 9)
|
||||
i++;
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
CPOCSAGMessage* message = m_dapnetNetwork->readMessage();
|
||||
if (message != NULL) {
|
||||
bool found = true;
|
||||
|
|
@ -406,6 +393,10 @@ void CDAPNETGateway::sendMessages()
|
|||
}
|
||||
|
||||
bool CDAPNETGateway::recover()
|
||||
/*
|
||||
Recovery now uses an increasing reconnect holdoff time to prevent
|
||||
DoS-like reconnect attempts to the core server.
|
||||
*/
|
||||
{
|
||||
const unsigned int backoff[] = {2000u, 4000u, 8000u, 10000u, 20000u, 60000u, 120000u, 240000u, 480000u, 600000u};
|
||||
int i=0;
|
||||
|
|
|
|||
|
|
@ -69,8 +69,6 @@ bool CDAPNETNetwork::read()
|
|||
unsigned char buffer[BUFFER_LENGTH];
|
||||
|
||||
int length = m_socket.read(buffer, BUFFER_LENGTH, 0U);
|
||||
if (length < 0)
|
||||
LogMessage ("socket.read: received error %d", length);
|
||||
if (length == -1) // Error
|
||||
return false;
|
||||
if (length == -2) // Connection lost
|
||||
|
|
|
|||
|
|
@ -19,6 +19,6 @@
|
|||
#if !defined(VERSION_H)
|
||||
#define VERSION_H
|
||||
|
||||
const char* VERSION = "20180823";
|
||||
const char* VERSION = "20180825";
|
||||
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue