Hello!
On Fri, Aug 22, 2014 at 12:16 AM, Bogdan Irimia wrote:
> I was afraid I had to explicitly close the connection whenever some error case happened.
>
No, you don't need to. Fatal errors always automatically close the
connection (note that, read timeout error is the only error that is
not fatal), and if you call close() on a closed connection, you'll get
the "closed" error (yeah, we should always check the return values of
every call, including "close" and "setkeepalive").
> I will try to reuse the connections as much as possible.
>
Cool. And don't forget to check the return values of setkeepalive()
(or set_keepalive()) to ensure it succeeds.
Regards,
-agentzh
P.S. Keep cc'ing the openresty-en mailing list.