Status: New
Owner: ----
Labels: Type-Defect Priority-Medium
New issue 67 by [email protected]: concurrency bug in
TCPTransportClient.sendMessage
https://code.google.com/p/jdiameter/issues/detail?id=67
while (rc < bytes.array().length) {
rc += socketChannel.write(bytes);
}
This code is not atomic. So, if many threads write messages in same time,
then all mixed in single garbage.
I fixed this just uncommented lock around loop. It is not problem, because
if have not contention, that lock is very light. But if have contention,
that slow application better than garbage instead of message.
But best fix is write from one thread through message queue.
Attachments:
sendMessage.patch 953 bytes
--
You received this message because this project is configured to send all
issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings
--
---
You received this message because you are subscribed to the Google Groups "mobicents-all-issues-changes" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.