From a02564e0a1924d701e68023ae5d4be8a012e8346 Mon Sep 17 00:00:00 2001 From: Christopher Jeffrey Date: Tue, 6 Sep 2016 00:56:25 -0700 Subject: [PATCH] test: fix http tests. --- lib/http/client.js | 2 +- test/http-test.js | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/http/client.js b/lib/http/client.js index c06fbd03..b8d3e12b 100644 --- a/lib/http/client.js +++ b/lib/http/client.js @@ -134,7 +134,7 @@ HTTPClient.prototype._close = function close(callback) { if (!this.socket) return utils.nextTick(callback); - this.socket.destroy(); + this.socket.disconnect(); this.socket = null; utils.nextTick(callback); diff --git a/test/http-test.js b/test/http-test.js index c3904a6f..eac59cf7 100644 --- a/test/http-test.js +++ b/test/http-test.js @@ -183,6 +183,7 @@ describe('HTTP', function() { it('should cleanup', function(cb) { constants.tx.COINBASE_MATURITY = 100; + wallet.close(); node.close(cb); }); });