Re: [reSIProcate-users] Unexpected TCP connection termination disturbing call setup
I'm not sure why you are still seeing this with 1.8.14. Looking at the following log statements:
11/10/2013 21:14:10 [Debug] RESIP | 13376 | SipStack.cxx:571 | SEND: SipReq: NOTIFY
5902@10.0.1.18:5060 tid=75234f2f0f140f5f cseq=8 NOTIFY contact=5901 / 8 from(tu)
11/10/2013 21:14:10 [Info] RESIP:TRANSPORT | 8808 | TcpConnection.cxx:97 | Failed write on 3256 Unknown error
11/10/2013 21:14:10 [Debug] RESIP:TRANSPORT | 8808 | Transport.cxx:156 | Would Block
11/10/2013 21:14:10 [Info] RESIP:TRANSPORT | 8808 | Connection.cxx:168 | Write failed on socket: 3256, closing connection
From Transport.cxx:156 - we know you are getting back WSAEWOULDBLOCK - if you look at the code in Connection.cxx near line 168 - it should be skipping the closing connection "if" statement due to EWOULDBLOCK being equal to WSAEWOULDBLOCK.
int nBytes = write(data.data() + mSendPos,int(data.size() - mSendPos));
if (nBytes < 0)
{
{
//fail(data.transactionId);
InfoLog(<< "Write failed on socket: " << this->getSocket() << ", closing connection");
return -1;
}
else
{
return 0;
}
}
Can you place some debug log statements around this code and see if you can understand why it is still going into the block that closes the connection?
Scott