-
Notifications
You must be signed in to change notification settings - Fork 38
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SctpChannel.send() return value ignored #21
Comments
Thanks for raising this @dpalmer895 ! @ammendonca any thoughts? |
I have implemented the following fix in the "protected void write(SelectionKey key)" method:
This was a quick fix to stop the loss of the message when the buffer is full. It adds the message to the end of the pending message queue so it will be sent out of order but at least it is not lost. |
@dpalmer895 awesome, thanks for taking the time to share back! 🎉 @ammendonca do you think you would have some time to review this any time soon? |
I am facing the same issue also. Is there an updated version with fix? |
I think this problem is only for non-netty implementation ? |
right, |
netty version is not tested ? what does it mean ? jss7 uses netty version for a long time according to history... https://www.telestax.com/blog/telscale-jss7-performance-improvements/ |
I encouter the same error, have anyone resolve it :( |
In AssociationImpl.java the return value of send is ignored:
You can see that the write method calls doSend() but ignores the return value. From what I could see the socket is configured in non blocking mode. In this case where the underlying output buffer is full the SctpChannel.send() method would return 0 indicating no bytes of the message were written. However the write() method doesn't check the return value and just assumes that the message was sent successfully (i.e. message not sent and therefore lost).
The text was updated successfully, but these errors were encountered: