You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have threading issue when using TCP. The issue arrives when jain sip stack sends the 1st SIP out via SipDialog.sendRequest:
(a) thread#1 executes: sendTCPMessage which calls sendBytes (clientSock = null -> openOutgoingConnection) -> writeChunks -> send
In "NioTcpMessageProcessor.send" at then end it will execute: selector.wakeup
(b) thread#2 wakes up since it is on selector.select and will execute write. In the write method line #214 nioHandler.getMessageChannel will return null and thus have a 'Dead socketChannel'
(c) thread#1 returns in sendTCPMessage and since sock != socketChannel 1st time it will excute:
nioHandler.putMessageChannel(sock, this);
But then this is too late. The 1st SipDialog.sendRequest is not sent out & the stack does not even retry because it does not detect this as a failure.
I have added myself a stack trace in the putMessageChannel to confirm that this is what happens.
Hi,
I've create the pull request on the restcomm/jainsip src code: RestComm/jain-sip#197 & I sent you an email ***@***.***)
When building the new release please make sure it goes on the maven repository (tag 1.3.0-93 was not deployed https://mvnrepository.com/artifact/javax.sip/jain-sip-ri)
Than you very much for your help.
BR,Dan S.
On Thursday, January 27, 2022, 03:31:34 a.m. EST, vladimirralev ***@***.***> wrote:
Hey, thanks. Looks good to me. Please do a pull request I will try to get to it in the next week or so.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications on the go with GitHub Mobile for iOS or Android.
You are receiving this because you authored the thread.Message ID: ***@***.***>
Activity
lmcdasi commentedon Jan 19, 2022
NIOHandler - openOutgoingConnection method, connected boolean is wrong. On line #379 replacing connected in if with:
if (attempted && (clientSock!= null && clientSock.isBlocking() && !clientSock.isConnected()))
would be more appropriate. The removeSocket in finally should happen only if clientSock is blocking & it is not connected.
vladimirralev commentedon Jan 27, 2022
Hey, thanks. Looks good to me. Please do a pull request I will try to get to it in the next week or so.
lmcdasi commentedon Jan 27, 2022
lmcdasi commentedon Feb 10, 2022
Hi, any update regarding the merge request ? I really need this fix. Thx.
YiuTerran commentedon Mar 17, 2022
@vladimirralev please review the pr...
close usnistgov#77
close usnistgov#77