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
The problem with this is that since HttpConnectionHandlerfinally calls close at the end of request processing, a request handler can not close the response. Instead what the request handlers end up doing is call flush() on the response in a code similar to this:
HttpServerResponse.close()
is not idempotent and hence can not be called multiple times.The problem with this is that since
HttpConnectionHandler
finally callsclose
at the end of request processing, a request handler can not close the response. Instead what the request handlers end up doing is call flush() on the response in a code similar to this:The above code will invoke two flushes per request and hence cause two underlying socket writes as opposed to ideally a single write.
If we make
HttpServerResponse.close()
idempotent the above code can be changed toNow,
HttpConnectionHandler
calling close will short-circuit (since the response is already closed) and hence will reduce one flush.The text was updated successfully, but these errors were encountered: