Skip to content

Commit

Permalink
http2: return this for Http2ServerRequest#setTimeout
Browse files Browse the repository at this point in the history
  • Loading branch information
rexagod committed Jun 20, 2020
1 parent fdf10ad commit 4a00810
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/internal/http2/compat.js
Original file line number Diff line number Diff line change
Expand Up @@ -411,9 +411,9 @@ class Http2ServerRequest extends Readable {
}

setTimeout(msecs, callback) {
if (this[kState].closed)
return;
this[kStream].setTimeout(msecs, callback);
if (!this[kState].closed)
this[kStream].setTimeout(msecs, callback);
return this;
}
}

Expand Down

0 comments on commit 4a00810

Please sign in to comment.