Commit 993f4df1 authored by Marco De Marco's avatar Marco De Marco
Browse files

Reset connection fix

parent 95192305
Loading
Loading
Loading
Loading
+7 −1
Original line number Diff line number Diff line
@@ -249,10 +249,12 @@ void Client::handleUpdateLists(const boost::system::error_code& errorCode)
    else if(errorCode == boost::asio::error::operation_aborted)
    {
        DEBUG_STREAM << "Client::handleUpdateLists() STOP" << endl;

        //TODO: change state and status
    }
    else
    {
        ERROR_STREAM << "Client::handleResolve() " << errorCode.message() << endl;
        ERROR_STREAM << "Client::handleUpdateLists() " << errorCode.message() << endl;

        writeState(Tango::ALARM);
        writeStatus(errorCode.message());
@@ -549,10 +551,14 @@ void Client::resetConnection()
    {
        ERROR_STREAM << "Client::resetConnection() Connection timeout" << endl;

        m_resetConnectionTimer.expires_at(boost::posix_time::pos_infin);

        closeConnection();

        startUpdateLists();
    }

    m_resetConnectionTimer.async_wait(boost::bind(&Client::resetConnection, this));
}

//==============================================================================
+2 −2
Original line number Diff line number Diff line
@@ -84,7 +84,7 @@ void SSLClient::startConnect(boost::asio::ip::tcp::resolver::iterator endPointIt
    }
    else
    {
        ERROR_STREAM << "PlainClient::startConnect() No more endpoint" << endl;
        ERROR_STREAM << "SSLClient::startConnect() No more endpoint" << endl;

        writeState(Tango::ALARM);
        writeStatus("No more endpoint");
@@ -105,7 +105,7 @@ void SSLClient::handleConnect(const boost::system::error_code& errorCode,
    }
    else
    {
        ERROR_STREAM << "PlainClient::handleConnect() " << errorCode.message() << endl;
        ERROR_STREAM << "SSLClient::handleConnect() " << errorCode.message() << endl;

        writeState(Tango::ALARM);
        writeStatus(errorCode.message());