Fix last connection state check. (#278)

This commit is contained in:
Eugene Kabanov 2022-05-27 23:03:32 +03:00 committed by GitHub
parent 728ab7faa7
commit b3548583fc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1119,6 +1119,7 @@ proc getBodyReader*(response: HttpClientResponseRef): HttpBodyReader =
## leaks.
doAssert(not(isNil(response.connection)),
"Response missing connection instance")
response.checkClosed()
doAssert(response.state == HttpReqRespState.Open,
"Response's state is " & $response.state)
doAssert(response.connection.state in