Fixes - Off-by-one bug for option maxQueue.
@@ -252,7 +252,7 @@ public class ServerSessionImpl implements ServerSession, Dumpable {
for (ServerSessionListener listener : _listeners) {
if (listener instanceof MaxQueueListener) {
final int maxQueueSize = _maxQueue;
- if (maxQueueSize > 0 && _queue.size() > maxQueueSize) {
+ if (maxQueueSize > 0 && _queue.size() >= maxQueueSize) {
if (!notifyQueueMaxed((MaxQueueListener)listener, this, _queue, sender, message)) {
return null;
}
