The starvation problems being experienced by testing of the MultiThreadedSocketIOProcessor(
DIRMINA-301) are related to this bug.
When using multiple threads the the removeal of attribute SUSPENDED_READS is not done after resuming reads it is done on any and all calls to release.
The session.removeAttribute( SUSPENDED_READS ); line should be moved inside the if statement.
in method release:
if( counter < maximumConnectionBufferSize && isSuspendedReads( session ) )
{
session.resumeRead();
session.removeAttribute( SUSPENDED_READS );
}
Patch is attached.