Abort all current visitor sessions before waiting for shutdown of each
@@ -259,6 +259,7 @@ public class DocumentV1ApiHandler extends AbstractRequestHandler {
// This blocks until all visitors are done. These, in turn, may require the asyncSession to be alive
// to be able to run, as well as dispatch of operations against it, which is done by visitDispatcher.
+ visits.values().forEach(VisitorSession::abort);
visits.values().forEach(VisitorSession::destroy);
// Shut down both dispatchers, so only we empty the queues of outstanding operations, and can be sure they're empty.
