diff --git a/modules/core/src/main/java/org/apache/synapse/config/SynapseConfiguration.java b/modules/core/src/main/java/org/apache/synapse/config/SynapseConfiguration.java index 47ed64af38..ace07c6109 100644 --- a/modules/core/src/main/java/org/apache/synapse/config/SynapseConfiguration.java +++ b/modules/core/src/main/java/org/apache/synapse/config/SynapseConfiguration.java @@ -2062,7 +2062,7 @@ public static void removeOneDeployedLib(String name) { Map.Entry libraryCountEntry = deployedLibs.get(name); if (libraryCountEntry != null) { Integer count = libraryCountEntry.getValue(); - if (count > 0) { + if (count > 1) { count--; libraryCountEntry.setValue(count); } else {