void TFramedACWriteRequest::writeError(
    size_t bytesWritten,
    const TTransportException& ex) noexcept {
  T_ERROR("TFramedAC: write failed after writing %zu bytes: %s",
          bytesWritten, ex.what());
  invokeErrorCallback();
}
Exemple #2
0
 virtual void handshakeError(TAsyncSSLSocket* sock,
                             const TTransportException& ex) noexcept {
   auto elapsedTime = millisecondsSince(acceptTime_);
   VLOG(3) << "SSL handshake error after " << elapsedTime.count() <<
       " ms; " << sock->getRawBytesReceived() << " bytes received & " <<
       sock->getRawBytesWritten() << " bytes sent: " <<
       ex.what();
   acceptor_->updateSSLStats(sock, elapsedTime, sslError_);
   acceptor_->sslConnectionError();
   delete this;
 }
Exemple #3
0
void HttpFetcher::readError(const TTransportException& ex) noexcept {
  fail(string("failed to read from socket: ") + ex.what());
}
Exemple #4
0
void
SSLCacheClient::connectError(const TTransportException& ex)
  noexcept
{
  cout << "connectError: " << ex.what() << endl;
}
Exemple #5
0
void HttpFetcher::writeError(size_t bytesWritten,
                             const TTransportException& ex) noexcept {
  fail(string("failed to write HTTP request: ") + ex.what());
}
 void connectError(const TTransportException& ex) noexcept {
   LOG(FATAL) << "connectError(): " << ex.what();
 }
 void handshakeError(TAsyncSSLSocket *sock,
                     const TTransportException& ex) noexcept {
   LOG(FATAL) << "handshakeError(): " << ex.what();
 }
bool closedLocallyOrDestroyed(const TTransportException& e) {
  std::string message = e.what();
  return (message == "Channel Destroyed") || closedLocally(e);
}
bool closedLocally(const TTransportException& e) {
  std::string message = e.what();
  return (e.getType() == TTransportException::END_OF_FILE) &&
         (message == "socket closed locally");
}
bool closedOrDestroyed(const TTransportException& e) {
  std::string message = e.what();
  return (message == "Channel Closed" ||
          message == "Channel Destroyed");
}
bool wasResetOrClosed(const TTransportException& e) {
  std::string message = e.what();
  return (message == "Channel Closed") || wasReset(e);
}
bool wasReset(const TTransportException& e) {
  return (e.getType() == TTransportException::INTERNAL_ERROR) &&
         (e.getErrno() == ECONNRESET);
}