Update the LDAP connection handler so that an operation is removed from the
"operations in progress" queue for the associated client connection immediately
before the response is sent to the client. This can help avoid race conditions
in which the client immediately re-uses the same message ID for the next
synchronous request and it could be received while post-response processing
is still in progress for that connection. Previously, this would have caused
the new request to be rejected even though there was technically nothing wrong
with what the client had done.
OpenDS Issue Number: 614
| | |
| | | */ |
| | | public void sendResponse(Operation operation) |
| | | { |
| | | // Since this is the final response for this operation, we can go ahead and |
| | | // remove it from the "operations in progress" list. It can't be canceled |
| | | // after this point, and this will avoid potential race conditions in which |
| | | // the client immediately sends another request with the same message ID as |
| | | // was used for this operation. |
| | | removeOperationInProgress(operation.getMessageID()); |
| | | |
| | | LDAPMessage message = operationToResponseLDAPMessage(operation); |
| | | if (message != null) |
| | | { |