private void maybeReopenStream ( Throwable throwable ) { if ( isActive . get ( ) && ! isPermanentError ( throwable ) ) { if ( isResourceExhaustedError ( throwable ) ) { nextAttempt = backoff . createNextAttempt ( nextAttempt ) ; } changeMap . clear ( ) ; resetStream ( ) ; } else { closeStream ( throwable ) ; } }
Re - opens the stream unless the specified error is considered permanent . Clears the change map .