deliverRawText uses this code to write </stream:stream> after a connection has been idle:
The write method called on the ioSession object returns an IoFuture instance. This ‘‘future’’ can be used to track the asynchronous results of operations called on the original object. The “join” method that’'s being called on the ‘‘future’’ object waits for the asynchronous operation to end.
Waiting for an asynchronous operation to end on an object that is know to be in a non-expected state (’‘idle’’ while it should have sent whitespaces) can be considered tricky. The IoFuture class has an overloaded join method, that takes a timeout. Can we use that instead of the -wait-forever- method that’'s used now?
Message was edited by: Guus
I just realized that this is probably causing JM-993 as well: An attempt to </stream:stream> locks forever before the session is closed - causing the session not to be closed.