[pjsip] pjsip_transport_shutdown() doesn't destroy a TCP transport

Helmut Wolf HelmutWolf1 at gmx.de
Tue Feb 26 11:47:23 EST 2008

Hi Benny,

Thank you for the quick answer. Now it works fine.

I have found another problem with TCP connections: When a pjsip client connects to a pjsip server using TCP and the client get
exited, then the TCP connection is shutdowned and destroyed (because of pjsip_endpt_destroy) but the server does only shutdown the
pjsip transport, not destroy. After the client is down, the tcp socket in the server application changes to state CLOSE_WAIT and
nothing happens. When I shutdown the server (where pjsip_endpt_destroy is called and herewith the transport will be destroyed) then
I got logging from pjsip: TCP transport destroyed with reason 130057: Socket is not connected (WSAENOTCONN).  

I think the problem is in pjsip_transport_shutdown(): The function is described that the transport will be destroyed if no object is
using the transport. Debugging this function shows that the reference counter is 0, but I haven't found code in this (and the
underlying) function where destroy- functions are called...

Best regards,

More information about the pjsip mailing list