H225 Read error (0), TCP Socket could not reconnect.

Discussion related to implementation and use of the H.323 Plus H.323 stack at http://www.h323plus.org.
Post Reply
Highlander
Posts: 1
Joined: Tue Mar 29, 2016 8:03 am

H225 Read error (0), TCP Socket could not reconnect.

Post by Highlander » Tue Mar 29, 2016 8:36 am

Hello,

I'm using H323Plus lib in my console app which is running on a server.
That console app is using to answer a call and record the message into file and hangsup.
Everything works fine. But sometimes after hangup I saw that the console app was spurting out streams of:

2016/02/24 10:01:39.989 h323pdu.cxx(1210) H225 Read error (0):
2016/02/24 10:01:39.989 h323pdu.cxx(1216) H225 TCP Socket could not reconnect. Proceed without channel.
2016/02/24 10:01:40.036 h323pdu.cxx(1210) H225 Read error (0):
2016/02/24 10:01:40.036 h323pdu.cxx(1216) H225 TCP Socket could not reconnect. Proceed without channel.
2016/02/24 10:01:40.145 h323pdu.cxx(1210) H225 Read error (0):
2016/02/24 10:01:40.161 h323pdu.cxx(1216) H225 TCP Socket could not reconnect. Proceed without channel.
2016/02/24 10:01:40.192 h323pdu.cxx(1210) H225 Read error (0):
2016/02/24 10:01:40.192 h323pdu.cxx(1216) H225 TCP Socket could not reconnect. Proceed without channel.
2016/02/24 10:01:40.302 h323pdu.cxx(1210) H225 Read error (0):
2016/02/24 10:01:40.317 h323pdu.cxx(1216) H225 TCP Socket could not reconnect. Proceed without channel.
2016/02/24 10:01:40.348 h323pdu.cxx(1210) H225 Read error (0):
2016/02/24 10:01:40.364 h323pdu.cxx(1216) H225 TCP Socket could not reconnect. Proceed without channel.
2016/02/24 10:01:40.458 h323pdu.cxx(1210) H225 Read error (0):
2016/02/24 10:01:40.458 h323pdu.cxx(1216) H225 TCP Socket could not reconnect. Proceed without channel.
2016/02/24 10:01:40.489 h323pdu.cxx(1210) H225 Read error (0):
2016/02/24 10:01:40.505 h323pdu.cxx(1216) H225 TCP Socket could not reconnect. Proceed without channel.
2016/02/24 10:01:40.599 h323pdu.cxx(1210) H225 Read error (0):
2016/02/24 10:01:40.599 h323pdu.cxx(1216) H225 TCP Socket could not reconnect. Proceed without channel.
2016/02/24 10:01:40.630 h323pdu.cxx(1210) H225 Read error (0):
2016/02/24 10:01:40.645 h323pdu.cxx(1216) H225 TCP Socket could not reconnect. Proceed without channel.
2016/02/24 10:01:40.739 h323pdu.cxx(1210) H225 Read error (0):
2016/02/24 10:01:40.739 h323pdu.cxx(1216) H225 TCP Socket could not reconnect. Proceed without channel.
2016/02/24 10:01:40.770 h323pdu.cxx(1210) H225 Read error (0):
2016/02/24 10:01:40.786 h323pdu.cxx(1216) H225 TCP Socket could not reconnect. Proceed without channel.
2016/02/24 10:01:40.880 h323pdu.cxx(1210) H225 Read error (0):
2016/02/24 10:01:40.880 h323pdu.cxx(1216) H225 TCP Socket could not reconnect. Proceed without channel.
2016/02/24 10:01:40.927 h323pdu.cxx(1210) H225 Read error (0):
2016/02/24 10:01:40.927 h323pdu.cxx(1216) H225 TCP Socket could not reconnect. Proceed without channel.

After investigation I found that Read() method in h323pdu.cxx returns true in line 1218:

1204 PBoolean H323SignalPDU::Read(H323Transport & transport)
1205 {
1206 PBYTEArray rawData;
1207 if (!transport.ReadPDU(rawData)) {
1208
1209 PTRACE(1, "H225\tRead error (" << transport.GetErrorNumber(PChannel::LastReadError)
1210 << "): " << transport.GetErrorText(PChannel::LastReadError));
1211
1212 if (transport.IsCallEstablished() && !transport.IsTransportSecure() &&
1213 transport.GetErrorCode(PChannel::LastReadError) != PChannel::Timeout) {
1214 // TODO: consult connection.HandleSignalChannelFailure() and disconnect or continue
1215 // this happens many minutes after the network connection is cut!
1216 PTRACE(1, "H225\tTCP Socket could not reconnect. Proceed without channel.");
1217 PThread::Sleep(100);
1218 return true;
1219 }
1220 return false;
1221 }
1222 return ProcessReadData(transport, rawData);
1223 }

TODO Comments says that I need to consult connection.HandleSignalChannelFailure() and disconnect or continue this happens many minutes after the network connection is cut.
In my case I don't need to continue this happens. So, the solution for me looks like just to return false; in line 1218.
Can you please let me know whether I am on a right track?

Many thanks for any assistance

Post Reply