if (eventLatch.await(200, TimeUnit.MILLISECONDS)) {
break;
}
}
catch (InterruptedException e) {
throw new OperationCanceledException();
}
if (monitor != null && monitor.isCanceled()) {
throw new OperationCanceledException();
}
}
}
finally {
server.removeServerListener(serverListener);