thrift/lib/cpp2/transport/rocket/server/RocketServerConnection.cpp
void RocketServerConnection::notifyPendingShutdown() {
  if (state_ != ConnectionState::ALIVE) {
    return;
  }

  state_ = ConnectionState::DRAINING;
  sendError(StreamId{0}, RocketException(ErrorCode::CONNECTION_CLOSE));
  closeIfNeeded();
}
// On graceful shutdown, ConnectionManager will first fire the
// notifyPendingShutdown() callback for each connection. Then, after the drain
// period has elapsed, closeWhenIdle() will be called for each connection.
// Note that ConnectionManager waits for a connection to become un-busy before
// calling closeWhenIdle().
On graceful shutdown, ConnectionManager will first fire the
notifyPendingShutdown() callback for each connection. Then, after the drain
period has elapsed, closeWhenIdle() will be called for each connection.
Note that ConnectionManager waits for a connection to become un-busy before
calling closeWhenIdle().
On graceful shutdown ConnectionManager will first fire the notifyPendingShutdown () callback for each connection . Then after the drain period has elapsed closeWhenIdle () will be called for each connection . Note that ConnectionManager waits for a connection to become un - busy before calling closeWhenIdle () .
void RocketServerConnection::notifyPendingShutdown() {
  if (state_ != ConnectionState::ALIVE) {
    return;
  }
  state_ = ConnectionState::DRAINING;
  sendError(StreamId{0}, RocketException(ErrorCode::CONNECTION_CLOSE));
  closeIfNeeded();
}
void RocketServerConnection :: notifyPendingShutdown ( ) { if ( state_ != ConnectionState :: ALIVE ) { return ; } state_ = ConnectionState :: DRAINING ; sendError ( StreamId { 0 } , RocketException ( ErrorCode :: CONNECTION_CLOSE ) ) ; closeIfNeeded ( ) ; }
On graceful shutdown, ConnectionManager will first fire the
notifyPendingShutdown() callback for each connection.
On graceful shutdown ConnectionManager will first fire the notifyPendingShutdown () callback for each connection .