예제 #1
0
void
Acceptor::onEmpty(const ConnectionManager& cm) {
  VLOG(3) << "Acceptor=" << this << " onEmpty()";
  if (state_ == State::kDraining) {
    checkDrained();
  }
}
예제 #2
0
void Acceptor::sslConnectionError(const folly::exception_wrapper& ex) {
  CHECK(numPendingSSLConns_ > 0);
  --numPendingSSLConns_;
  --totalNumPendingSSLConns_;
  if (state_ == State::kDraining) {
    checkDrained();
  }
}
예제 #3
0
void
Acceptor::sslConnectionError() {
  CHECK(numPendingSSLConns_ > 0);
  --numPendingSSLConns_;
  --totalNumPendingSSLConns_;
  if (state_ == State::kDraining) {
    checkDrained();
  }
}
예제 #4
0
void
Acceptor::sslConnectionReady(AsyncSocket::UniquePtr sock,
                             const SocketAddress& clientAddr,
                             const string& nextProtocol,
                             TransportInfo& tinfo) {
  CHECK(numPendingSSLConns_ > 0);
  connectionReady(std::move(sock), clientAddr, nextProtocol, tinfo);
  --numPendingSSLConns_;
  --totalNumPendingSSLConns_;
  if (state_ == State::kDraining) {
    checkDrained();
  }
}
예제 #5
0
파일: Acceptor.cpp 프로젝트: Alienfeel/hhvm
void
Acceptor::acceptStopped() noexcept {
  // Close all of the idle connections
  closeIdleConnections();

  // If we haven't yet finished draining, begin doing so by marking ourselves
  // as in the draining state. We must be sure to hit checkDrained() here, as
  // if we're completely idle, we can should consider ourself drained
  // immediately (as there is no outstanding work to complete to cause us to
  // re-evaluate this).
  if (state_ != State::kDone) {
    state_ = State::kDraining;
    checkDrained();
  }
}
예제 #6
0
파일: Acceptor.cpp 프로젝트: Alienfeel/hhvm
void
Acceptor::onEmpty(const ConnectionManager& cm) {
  if (state_ == State::kDraining) {
    checkDrained();
  }
}