You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Right now httpc:set_keepalive will pool any socket if the HTTP response version + Connection response header support it, even if the body wasn't read yet and the socket isn't ready to be pooled (assuming the body wasn't received by OpenResty yet, because then it will return an error).
I suggest we keep an internal state in httpc to track whether the request and response has completed successfully (probably at the end of the body readers + a few more places) and set_keepalive() will only pool if the socket is ready.
This will prevent pooling sockets in strange states.
The text was updated successfully, but these errors were encountered:
Right now
httpc:set_keepalive
will pool any socket if the HTTP response version + Connection response header support it, even if the body wasn't read yet and the socket isn't ready to be pooled (assuming the body wasn't received by OpenResty yet, because then it will return an error).I suggest we keep an internal state in
httpc
to track whether the request and response has completed successfully (probably at the end of the body readers + a few more places) andset_keepalive()
will only pool if the socket is ready.This will prevent pooling sockets in strange states.
The text was updated successfully, but these errors were encountered: