Skip to content

Commit ce237f3

Browse files
Moritz Petersmaritz
authored andcommitted
Fix closing the http2 connections to prevent possible exceptions
1 parent 8d45e7e commit ce237f3

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

test/compression.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -324,8 +324,11 @@ describe('compression()', function () {
324324
})
325325
request.on('response', function (headers) {
326326
assert.equal(headers['content-encoding'], 'gzip')
327-
client.destroy()
328-
done()
327+
client.close(function () {
328+
server.close(function () {
329+
done()
330+
})
331+
})
329332
})
330333
request.end()
331334
})

0 commit comments

Comments
 (0)