Skip to content
Snippets Groups Projects
Verified Commit 734dcc53 authored by bontric's avatar bontric Committed by Julian Dehm
Browse files

Fix missing commit/end transaction in connection manager (mailbox connection)

parent 9b553447
No related branches found
No related tags found
No related merge requests found
......@@ -268,8 +268,9 @@ class ConnectionManagerImpl implements ConnectionManager {
return;
}
contactId = ctx.getContactId();
Transaction txn = null;
try {
Transaction txn = db.startTransaction(true);
txn = db.startTransaction(true);
ContactType type = db.getContactType(txn, contactId);
switch (type) {
case MAILBOX_OWNER:
......@@ -278,11 +279,16 @@ class ConnectionManagerImpl implements ConnectionManager {
return;
default:
}
db.commitTransaction(txn);
} catch (DbException e) {
logException(LOG, WARNING, e);
disposeReader(true, true);
return;
}finally {
if (txn != null)
db.endTransaction(txn);
}
connectionRegistry.registerConnection(contactId, transportId, true);
// Start the outgoing session on another thread
ioExecutor.execute(this::runOutgoingSession);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment