async-h1
async-h1 copied to clipboard
Return error instead of panicing when server not ready
I'm running into an assert!(...) here, which should probably just return an error, instead: https://docs.rs/async-h1/2.1.2/src/async_h1/client/decode.rs.html#32
(I think that's what the TODO there is suggesting.)
In this case, I know that the server I'm querying may not be up yet -- I'm issuing requests in a loop with a timeout, for the purpose of waiting for the server to come up all the way.
Just a heads-up for others: this may now be fixed: https://docs.rs/async-h1/2.3.2/src/async_h1/client/decode.rs.html#32.
I haven't had a chance to test it yet, but the code looks like it's doing the right thing now, at least.