void ThriftTransportBase::connectErr( const folly::AsyncSocketException& ex) noexcept { assert(connectionState_ == ConnectionState::Connecting); connectionState_ = ConnectionState::Error; connectionTimedOut_ = (ex.getType() == folly::AsyncSocketException::TIMED_OUT); VLOG(2) << "[ThriftTransport] Error connecting: " << ex.what(); }
void AsyncMcClientImpl::connectErr( const folly::AsyncSocketException& ex) noexcept { assert(connectionState_ == ConnectionState::CONNECTING); DestructorGuard dg(this); mc_res_t error; if (ex.getType() == folly::AsyncSocketException::TIMED_OUT) { error = mc_res_connect_timeout; } else if (isAborting_) { error = mc_res_aborted; } else { error = mc_res_connect_error; } assert(getInflightRequestCount() == 0); queue_.failAllPending(error); connectionState_ = ConnectionState::DOWN; // We don't need it anymore, so let it perform complete cleanup. socket_.reset(); if (statusCallbacks_.onDown) { statusCallbacks_.onDown(isAborting_); } }
void AsyncMcClientImpl::readErr( const folly::AsyncSocketException& ex) noexcept { assert(connectionState_ == ConnectionState::UP); VLOG(1) << "Failed to read from socket with remote endpoint \"" << connectionOptions_.accessPoint.toString() << "\". Exception: " << ex.what(); processShutdown(); }
void AsyncMcClientImpl::writeErr( size_t bytesWritten, const folly::AsyncSocketException& ex) noexcept { assert(connectionState_ == ConnectionState::UP || connectionState_ == ConnectionState::ERROR); VLOG(1) << "Failed to write into socket with remote endpoint \"" << connectionOptions_.accessPoint.toString() << "\", wrote " << bytesWritten << " bytes. Exception: " << ex.what(); // We're already in an error state, so all requests in pendingReplyQueue_ will // be replied with an error. queue_.markNextAsSent(); processShutdown(); }
void FifoReadCallback::readErr(const folly::AsyncSocketException& e) noexcept { LOG(ERROR) << "Error reading fifo \"" << fifoName_ << "\": " << e.what(); }
void CurlClient::connectError(const folly::AsyncSocketException& ex) { LOG_IF(ERROR, loggingEnabled_) << "Coudln't connect to " << url_.getHostAndPort() << ":" << ex.what(); }
void CurlClient::connectError(const folly::AsyncSocketException& ex) { LOG(ERROR) << "Coudln't connect to :" << ex.what(); }
void onReadError(const folly::AsyncSocketException& ex) noexcept override { VLOG(4) << ex.what(); // Start listening for next PONG socket_->resumeRead(this); }