Changeset 19435


Ignore:
Timestamp:
Feb 5, 2019, 4:01:11 PM (11 days ago)
Author:
tbretz
Message:
Allow to create a pending connection and call reconnect instead.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/FACT++/src/Database.h

    r19236 r19435  
    7676            set_option(new mysqlpp::CompressOption());
    7777
     78        set_option(new mysqlpp::ReconnectOption(true));
     79
    7880        // Connect to the database
    7981        if (!server.empty())
    80             connect(db.c_str(), server.c_str(), user.c_str(), passwd.c_str(), port);
     82            reconnect();
     83    }
     84
     85    void reconnect()
     86    {
     87        connect(db.c_str(), server.c_str(), user.c_str(), passwd.c_str(), port);
    8188    }
    8289};
Note: See TracChangeset for help on using the changeset viewer.