{
synchronized (directoryServer.connectionHandlers)
{
directoryServer.connectionHandlers.remove(handler);
ConnectionHandlerMonitor monitor = handler.getConnectionHandlerMonitor();
if (monitor != null)
{
String instanceName = toLowerCase(monitor.getMonitorInstanceName());
deregisterMonitorProvider(instanceName);
monitor.finalizeMonitorProvider();
handler.setConnectionHandlerMonitor(null);
}
}
}