void Acceptor::onEmpty(const ConnectionManager& cm) { VLOG(3) << "Acceptor=" << this << " onEmpty()"; if (state_ == State::kDraining) { checkDrained(); } }
void Acceptor::sslConnectionError(const folly::exception_wrapper& ex) { CHECK(numPendingSSLConns_ > 0); --numPendingSSLConns_; --totalNumPendingSSLConns_; if (state_ == State::kDraining) { checkDrained(); } }
void Acceptor::sslConnectionError() { CHECK(numPendingSSLConns_ > 0); --numPendingSSLConns_; --totalNumPendingSSLConns_; if (state_ == State::kDraining) { checkDrained(); } }
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(); } }
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(); } }
void Acceptor::onEmpty(const ConnectionManager& cm) { if (state_ == State::kDraining) { checkDrained(); } }