Skip to content

Commit

Permalink
Merge branch 'gi9obru0etuPlc6wozls-transaction_fix'
Browse files Browse the repository at this point in the history
  • Loading branch information
treefrogframework committed Nov 25, 2019
2 parents e389e49 + ac69a71 commit 680cd54
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
3 changes: 2 additions & 1 deletion src/tactioncontext.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,8 @@ void TActionContext::execute(THttpRequest &request, int sid)
}

// Database Transaction
setTransactionEnabled(currController->transactionEnabled());
for (int databaseId = 0; databaseId < Tf::app()->sqlDatabaseSettingsCount(); ++databaseId)
setTransactionEnabled(currController->transactionEnabled(), databaseId);

// Do filters
bool dispatched = false;
Expand Down
3 changes: 2 additions & 1 deletion src/tdatabasecontextmainthread.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,6 @@
TDatabaseContextMainThread::TDatabaseContextMainThread(QObject *parent) :
TDatabaseContextThread(parent)
{
setTransactionEnabled(false);
for (int databaseId = 0; databaseId < Tf::app()->sqlDatabaseSettingsCount(); ++databaseId)
setTransactionEnabled(false, databaseId);
}
3 changes: 2 additions & 1 deletion src/twebsocketworker.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,8 @@ void TWebSocketWorker::execute(int opcode, const QByteArray &payload)
endpoint->peerAddr = peerInfo.first;
endpoint->peerPortNumber = peerInfo.second;
// Database Transaction
setTransactionEnabled(endpoint->transactionEnabled());
for (int databaseId = 0; databaseId < Tf::app()->sqlDatabaseSettingsCount(); ++databaseId)
setTransactionEnabled(endpoint->transactionEnabled(), databaseId);

switch (_mode) {
case Opening: {
Expand Down

0 comments on commit 680cd54

Please sign in to comment.