Open edubart opened 7 years ago
I hit the same problem and I made some changes to my copy of the the core coro-wrapper and coro-channel libraries to provide support for optional read timeouts. They would need to be wired through to http library, but shouldn't be too difficult. Just look for :read in there.
@halfnelson would you like to send a PR to see if your changes can get merged here?
Coro http has no timeout option, if you do a HTTP request to an unresponsive address the coroutine it will never resume.
Test case:
Running this example with luvit it will run forever.
This is problematic because I was running a daemon using coro-http and it got stuck forever when my network was down, even after the network became alive again.