nitely / nim-hyperx

Pure Nim http2 client and server 🖖
MIT License
29 stars 0 forks source link

Raise on recv canceled #29

Closed nitely closed 1 month ago

nitely commented 1 month ago

recvBody returns empty when the stream is canceled in between checking stream.recvEnded and await recvBody. If there is some other await before recvBody.

This makes things consistent, and user can do while true until the stream is canceled or it ends.

But if streams ends with trailers or empty data, this will raise a closed queue error, mmmh