updateKeepAlive method

  1. @protected
void updateKeepAlive()

Ensures any AutomaticKeepAlive ancestors stay in sync with keepAlive.

Implementation

@protected
void updateKeepAlive() {
  if (wantKeepAlive) {
    if (_keepAliveHandle == null) {
      _ensureKeepAlive();
    }
  } else if (_keepAliveHandle != null) {
    _releaseKeepAlive();
  }
}