coro-http has no timeout
Coro http has no timeout option, if you do a HTTP request to an unresponsive address the coroutine it will never resume.
Test case:
local http = require 'coro-http'
coroutine.wrap(function()
http.request('GET', 'http://123.123.123.123/')
end)()
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.
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?