Skip to content

Commit

Permalink
add timeout for database connection #501
Browse files Browse the repository at this point in the history
  • Loading branch information
otahirs committed Jan 14, 2020
1 parent 7242683 commit ae40863
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions quickevent/app/plugins/Event/src/eventplugin.cpp
Expand Up @@ -650,6 +650,7 @@ void EventPlugin::connectToSqlServer()
//qfInfo() << conn_w->serverPassword();
db.setPassword(conn_w->serverPassword());
db.setDatabaseName("quickevent");
db.setConnectOptions("connect_timeout=30");
qfInfo().nospace() << "connecting to database: " << db.databaseName()
<< " as " << db.userName() << "@" << db.hostName() << ":" << db.port();
connect_ok = db.open();
Expand Down

0 comments on commit ae40863

Please sign in to comment.