Skip to content

Commit 75794dd

Browse files
Moritz Petersmaritz
authored andcommitted
Fix closing the request first, then the client, then the server
1 parent ce237f3 commit 75794dd

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

test/compression.js

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -324,9 +324,11 @@ describe('compression()', function () {
324324
})
325325
request.on('response', function (headers) {
326326
assert.equal(headers['content-encoding'], 'gzip')
327-
client.close(function () {
328-
server.close(function () {
329-
done()
327+
request.close(http2.constants.NGHTTP2_NO_ERROR, function () {
328+
client.close(function () {
329+
server.close(function () {
330+
done()
331+
})
330332
})
331333
})
332334
})

0 commit comments

Comments
 (0)