Lint responseCount
This commit is contained in:
parent
fa56b43a83
commit
15e149f76b
|
@ -94,11 +94,12 @@ class DirectAccount(context: Context) : Account<OkHttpClient> {
|
|||
return response.request.newBuilder().header("Authorization", credential).build()
|
||||
}
|
||||
|
||||
private fun responseCount(_response: Response): Int {
|
||||
var response = _response
|
||||
/** Count number of authentication request/response */
|
||||
private fun responseCount(response: Response): Int {
|
||||
var mutResponse = response
|
||||
var result = 1
|
||||
while (response.priorResponse?.also {
|
||||
response = it
|
||||
while (mutResponse.priorResponse?.also {
|
||||
mutResponse = it
|
||||
} != null
|
||||
) {
|
||||
result++
|
||||
|
|
Loading…
Reference in New Issue