We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 43bfeb4 commit 9b8abb8Copy full SHA for 9b8abb8
lib/dispatcher/client-h2.js
@@ -203,11 +203,12 @@ function onHttp2SessionGoAway (errorCode) {
203
util.destroy(this[kSocket], err)
204
205
// Fail head of pipeline.
206
- const request = client[kQueue][client[kRunningIdx]]
207
- client[kQueue][client[kRunningIdx]++] = null
208
- util.errorRequest(client, request, err)
209
-
210
- client[kPendingIdx] = client[kRunningIdx]
+ if (client[kRunningIdx] < client[kQueue].length) {
+ const request = client[kQueue][client[kRunningIdx]]
+ client[kQueue][client[kRunningIdx]++] = null
+ util.errorRequest(client, request, err)
+ client[kPendingIdx] = client[kRunningIdx]
211
+ }
212
213
assert(client[kRunning] === 0)
214
0 commit comments