powered by Jive Software

Smack socket read operation


We’re using Smack library to send Jabber notifications from JetBrains TeamCity server.

We’ve faced a bug: http://youtrack.jetbrains.com/issue/TW-23474

Looks like the problem occurs due to infinite read timeout for the socket (setSoTimeout(0)) + attempt to close the reader which reads from the socket in such situation.

I’ve prepared the fix against trunk (patch is attached to this message). The idea of the fix is to close socket first, before the reader. I have no good idea how to verify this, but it should work.

I would appreciate if you include my fix into codebase if you find it valid.



P.S. My original account (maxkir) was disabled, probably you could re-enable it?
TW-23474.diff.zip (703 Bytes)


I have re-enabled your maxkir account


I havn’t looked deep into the patch, but I reminds me somehow of SMACK-278.

Thanks Flow,

Indeed, looks like quite the similar problem. In my case, PacketReader thread is not involved, though.

I’ll watch the issue.