File tree Expand file tree Collapse file tree 1 file changed +8
-6
lines changed
src/main/java/io/supertokens Expand file tree Collapse file tree 1 file changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -209,12 +209,14 @@ private void init() throws IOException, StorageQueryException {
209209 // load all configs for each of the tenants.
210210 MultitenancyHelper .getInstance (this ).loadConfig (new ArrayList <>());
211211
212- // we want to load storage layer once again so that the base storage also contains the right
213- // tenant identifier set passed to the init. So we close the base storage layer and also clear
214- // all the resources for storage layer
215- StorageLayer .getBaseStorage (this ).stopLogging ();
216- StorageLayer .getBaseStorage (this ).close ();
217- this .getResourceDistributor ().clearAllResourcesWithResourceKey (StorageLayer .RESOURCE_KEY );
212+ if (!StorageLayer .isInMemDb (this )) {
213+ // we want to load storage layer once again so that the base storage also contains the right
214+ // tenant identifier set passed to the init. So we close the base storage layer and also clear
215+ // all the resources for storage layer
216+ StorageLayer .getBaseStorage (this ).stopLogging ();
217+ StorageLayer .getBaseStorage (this ).close ();
218+ this .getResourceDistributor ().clearAllResourcesWithResourceKey (StorageLayer .RESOURCE_KEY );
219+ }
218220
219221 MultitenancyHelper .getInstance (this ).loadStorageLayer ();
220222 } catch (InvalidConfigException e ) {
You can’t perform that action at this time.
0 commit comments