You should pass timeouts to calls such as :get_headers() to prevent clients causing resource exhaustion.
Same for :write functions: you don't want to waste resources forever if the client never acks the data.
Btw, on failure you should always try to call stream:shutdown() which allows for immediate resource freeing (and in some cases stuff like connection pooling/reuse)
You should pass timeouts to calls such as
:get_headers()to prevent clients causing resource exhaustion.Same for
:writefunctions: you don't want to waste resources forever if the client never acks the data.Btw, on failure you should always try to call
stream:shutdown()which allows for immediate resource freeing (and in some cases stuff like connection pooling/reuse)