Openfire overactivity check

If you’ve seen some of my other posts, I’m clearly having intermittent BOSH connection establishment issues

Occassionally, clients run into the policy-violation error that terminates the BOSH connection during connection establishment. I turned on Openfire debug logs and from what I see in the exchange of req-resp for the given BOSH connection is the following:

Fri Jul 20 10:45:00 PDT 2012: HTTP RECV(9e35572b):

Fri Jul 20 10:45:00 PDT 2012: HTTP RECV(9e35572b):

Fri Jul 20 10:45:00 PDT 2012: HTTP ERR(9e35572b): terminate, policy-violation.

Fri Jul 20 10:45:00 PDT 2012: HTTP SENT(9e35572b):

According to the xmpp extension for BOSH, policy-violation occurs during overactivity when the client sends more requests than the specified “requests” attribute sent in the response by the connection manager (which is 2). However, according to the logs, my client never sent more than 2 concurrent requests, yet Openfire reported overactivity.

I looked through the code a bit and found the following in HttpSession.checkOveractivity():

if(pendingConnections >= maxRequests) {
    overactivity = true;
    errorMessage += ", too many simultaneous requests.";
}

Wouldn’t it make more sense to be pendingConnections > maxRequests? Does anyone know what the reason for this implementation was? Or perhaps a solution for this policy-violation condition that I hit sporadically?

Thanks,

Conrad