diff --git a/lib/dispatcher/client-h2.js b/lib/dispatcher/client-h2.js index e22234de8d6..e472ce6830e 100644 --- a/lib/dispatcher/client-h2.js +++ b/lib/dispatcher/client-h2.js @@ -312,29 +312,7 @@ function connectH2 (client, socket) { } if (request != null) { - if (client[kRunning] > 0) { - // We are already processing requests - - // Unlike HTTP/1.1 pipelining, HTTP/2 multiplexes requests on - // independent streams, so non-idempotent requests can be dispatched - // concurrently. Retry eligibility is handled by stream/session error - // handling instead of by serializing all non-idempotent requests. - // Don't dispatch an upgrade until all preceding requests have completed. - // Possibly, we do not have remote settings confirmed yet. - if ((request.upgrade === 'websocket' || request.method === 'CONNECT') && session[kRemoteSettings] === false) return true - // Request with stream or iterator body can error while other requests - // are inflight and indirectly error those as well. - // Ensure this doesn't happen by waiting for inflight - // to complete before dispatching. - - // Request with stream or iterator body cannot be retried. - // Ensure that no other requests are inflight and - // could cause failure. - if (util.bodyLength(request.body) !== 0 && - (util.isStream(request.body) || util.isAsyncIterable(request.body) || util.isFormDataLike(request.body))) return true - } else { - return (request.upgrade === 'websocket' || request.method === 'CONNECT') && session[kRemoteSettings] === false - } + return (request.upgrade === 'websocket' || request.method === 'CONNECT') && session[kRemoteSettings] === false } return false