Skip to content

Commit 626da62

Browse files
committed
Ensure persistence manager is initialised early in MQTT auth wrapper
1 parent df85d8d commit 626da62

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

  • FROST-Server.MQTT.Moquette/src/main/java/de/fraunhofer/iosb/ilt/frostserver/mqtt/moquette

FROST-Server.MQTT.Moquette/src/main/java/de/fraunhofer/iosb/ilt/frostserver/mqtt/moquette/AuthWrapper.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,11 +124,13 @@ public AuthWrapper(CoreSettings coreSettings, String authProviderClassName, Stri
124124
anonymousRead = authSettings.getBoolean(TAG_AUTH_ALLOW_ANON_READ, CoreSettings.class);
125125
String topicAllowListRegex = authSettings.get(TAG_MQTT_TOPIC_ALLOWLIST, MoquetteMqttServer.class);
126126

127+
// Ensure PM is initialised early.
128+
PersistenceManagerFactory.init(coreSettings);
129+
127130
if (isNullOrEmpty(topicAllowListRegex)) {
128131
topicAllowPattern = null;
129132
} else {
130133
topicAllowPattern = Pattern.compile(topicAllowListRegex);
131-
PersistenceManagerFactory.init(coreSettings);
132134
}
133135

134136
Map<AuthUtils.Role, String> roleMapping = AuthUtils.loadRoleMapping(authSettings);

0 commit comments

Comments
 (0)