Skip to content

Why doesn’t aread() in a custom Transport set response.elapsed? #3271

Answered by thurse93
thurse93 asked this question in Q&A
Discussion options

You must be logged in to vote

Ok it seems I got a bit confused there, because it's quite obvious: elapsed gets set on closing BoundSyncStream or BoundAsyncStream, which are both constructed in the respective clients after the transports are getting invoked. I think I got lost in the streams... ^^ and the error message set me on the wrong track.

I guess that leaves us with only one option: Using the event hook for logging the regular reponses and using our custom transport for logging the errors.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by tomchristie
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant