Close and reconnect the SIGTRAN stream socket whenever an error or EOF occurs.
git-svn-id: http://yate.null.ro/svn/yate/trunk@4388 acf43c95-373e-0410-b603-e72c3f656dc1
This commit is contained in:
parent
3aebbf24d7
commit
19d0cf70c6
|
@ -30,8 +30,8 @@
|
|||
|
||||
#define MAX_BUF_SIZE 48500
|
||||
|
||||
#define CONN_RETRY_MIN 100000
|
||||
#define CONN_RETRY_MAX 6000000
|
||||
#define CONN_RETRY_MIN 250000
|
||||
#define CONN_RETRY_MAX 60000000
|
||||
|
||||
using namespace TelEngine;
|
||||
namespace { // anonymous
|
||||
|
@ -962,8 +962,11 @@ bool StreamReader::sendBuffer(int streamId)
|
|||
DDebug(m_transport,DebugAll,"Select error detected. %s",strerror(errno));
|
||||
return false;
|
||||
}
|
||||
if (error)
|
||||
if (error) {
|
||||
if (m_socket->updateError() && !m_socket->canRetry())
|
||||
connectionDown();
|
||||
return false;
|
||||
}
|
||||
if (!sendOk)
|
||||
return true;
|
||||
int len = 0;
|
||||
|
@ -1043,8 +1046,7 @@ bool StreamReader::readData()
|
|||
len = m_socket->recv((void*)buf,m_headerLen);
|
||||
}
|
||||
if (len == 0) {
|
||||
if (!m_transport->supportEvents())
|
||||
connectionDown();
|
||||
connectionDown();
|
||||
return false;
|
||||
}
|
||||
if (len < 0) {
|
||||
|
|
Loading…
Reference in New Issue