diff --git a/client/clientConnection.cpp b/client/clientConnection.cpp index 95e8ce4a..aa12b433 100644 --- a/client/clientConnection.cpp +++ b/client/clientConnection.cpp @@ -84,6 +84,7 @@ void ClientConnection::start() connected_ = true; SLOG(NOTICE) << "Connected to " << socket_->remote_endpoint().address().to_string() << endl; active_ = true; + sumTimeout_ = chronos::msec(0); readerThread_ = new thread(&ClientConnection::reader, this); } diff --git a/client/controller.cpp b/client/controller.cpp index 297715b4..38de7d53 100644 --- a/client/controller.cpp +++ b/client/controller.cpp @@ -197,8 +197,8 @@ void Controller::worker() { if (async_exception_) { - LOG(ERROR) << "Async exception: " << async_exception_->what() << "\n"; - throw *async_exception_; + LOG(DEBUG) << "Async exception: " << async_exception_->what() << "\n"; + throw SnapException(async_exception_->what()); } shared_ptr reply = clientConnection_->sendReq(&timeReq, chronos::msec(2000)); @@ -219,8 +219,8 @@ void Controller::worker() chronos::sleep(100); if (async_exception_) { - LOG(ERROR) << "Async exception: " << async_exception_->what() << "\n"; - throw *async_exception_; + LOG(DEBUG) << "Async exception: " << async_exception_->what() << "\n"; + throw SnapException(async_exception_->what()); } }