async-h1 icon indicating copy to clipboard operation
async-h1 copied to clipboard

Return error instead of panicing when server not ready

Open karlmdavis opened this issue 5 years ago • 1 comments

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.

karlmdavis avatar Aug 08 '20 17:08 karlmdavis

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.

karlmdavis avatar Jul 09 '21 02:07 karlmdavis