diff --git a/distributed/src/main/java/com/orientechnologies/orient/server/distributed/impl/ODistributedDatabaseImpl.java b/distributed/src/main/java/com/orientechnologies/orient/server/distributed/impl/ODistributedDatabaseImpl.java index 14fe9d1db82..d451a8b6466 100755 --- a/distributed/src/main/java/com/orientechnologies/orient/server/distributed/impl/ODistributedDatabaseImpl.java +++ b/distributed/src/main/java/com/orientechnologies/orient/server/distributed/impl/ODistributedDatabaseImpl.java @@ -927,7 +927,10 @@ public void shutdown() { shutdown(true); } - public void shutdown(boolean wait) { + public synchronized void shutdown(boolean wait) { + if (!running) { + return; + } waitPending(); running = false;