jain-sip
jain-sip copied to clipboard
JAIN SIP doesn't timeout in edge case
I see this weird behaviour when I try to use port 5060 with TLS enabled (which is wrong of course), but I would expect the REGISTER transaction to time out so that I get a chance to do something about it like showing an error, etc. If I do the opposite, use port 5061 with non-TLS, everything is ok and I get the time out as expected.
Here is the jain log for the bad scenario. And here for the good scenario.
Btw @jaimecasero if this is indeed a bug, I could help with the implementation if you could point me in the right direction to broaden my horizons ;)
well, have you wait long enough to check any timeout exception?
The traces show the SSL handshake was started, and probably an IO operation is blocked waiting some condition. It woould be worth checking the connection timeout configuration. Could you check if this property is set "gov.nist.javax.sip.SSL_HANDSHAKE_TIMEOUT"?, by default is "-1", which means it wil wait forever. Set it to the max number of milliseconds to want to wait for the handshake to complete...