mirror of
https://github.com/LuckPerms/LuckPerms.git
synced 2026-11-22 01:32:17 +00:00
Ignore errors when creating Mongo indexes
This commit is contained in:
1 file changed
+7
-1
+7
-1
@@ -31,6 +31,7 @@ import com.mongodb.MongoClient;
|
||||
import com.mongodb.MongoClientOptions;
|
||||
import com.mongodb.MongoClientURI;
|
||||
import com.mongodb.MongoCredential;
|
||||
import com.mongodb.MongoException;
|
||||
import com.mongodb.ServerAddress;
|
||||
import com.mongodb.client.MongoCollection;
|
||||
import com.mongodb.client.MongoCursor;
|
||||
@@ -150,7 +151,12 @@ public class MongoStorage implements StorageImplementation {
|
||||
}
|
||||
|
||||
this.database = this.mongoClient.getDatabase(this.configuration.getDatabase());
|
||||
ensureIndexes();
|
||||
|
||||
try {
|
||||
ensureIndexes();
|
||||
} catch (MongoException e) {
|
||||
// ignore
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in new issue
Block a user