Commit e086b12c authored by jan.koester's avatar jan.koester
Browse files

cleaned up

parent 4b1a4589
Loading
Loading
Loading
Loading
Loading
+2 −11
Changes for client/client.cpp: 2 added lines, 11 removed lines.
Original line number Diff line number Diff line
@@ -80,18 +80,9 @@ void authdb::client::ClientConnection::setSessionID(const ::uuid::uuid& sid){
}

authdb::client::Client::Client(ClientConnection& clt) : _Con(clt){
try {
    libhttppp::HttpRequest nreq_test;
        nreq_test.setHeaderData("accept")->push_back("text/html");
        _Con._Client->Get(nreq_test);
    } catch (libhttppp::HTTPException &e) {
        try {
            _Con._Client->reconnect();
        } catch (...) {
            throw(authdb::AuthBackendError("Auth Connect HttpError: " + e.what()));
        }
    } catch (...) {
        throw(authdb::AuthBackendError("Auth Connect Unknown Error during connection test!"));
    if (!_Con._Client) {
        _Con._Client = std::make_unique<libhttppp::HttpClient>(_Con._Url);
    }
}