private boolean needApplyTaskTimeout ( RequestContext requestContext , ConfigValue < Long > timeout ) { // return false if no timeout configured or per-request timeout already specified in request context return timeout . getValue ( ) != null && timeout . getValue ( ) > 0 && ! hasRequestContextTimeout ( requestContext ) ; }
check whether we need to apply timeout to a rest . li request task .