Fixes database lock exceptions

Thus fixing characters not loading their data correctly from the
database after server-restart.
This commit is contained in:
CharonInferar
2014-09-27 18:17:24 +02:00
parent 66156e1d3f
commit 51bcb80d6c
+5
View File
@@ -205,6 +205,8 @@ public class ObjectService implements INetworkDispatch {
objectList.put(object.getObjectID(), object);
}
cursor.close(); // Has always to be closed properly or will create undefined locking behaviour!
cursor = core.getReusableIdODB().getCursor();
while (cursor.hasNext()) {
@@ -212,6 +214,9 @@ public class ObjectService implements INetworkDispatch {
}
loadBuildings();
cursor.close(); // Has always to be closed properly or will create undefined locking behaviour!
System.out.println("Finished loading objects.");
}