commit 731161c1ca69bd97cafe6ba4ebe898c7d7983788 parent 0de03035c336ebf68e5735b0ad136a7a7fb750d8 Author: finwo <finwo@pm.me> Date: Fri, 16 Nov 2018 11:05:10 +0100 Minor fix @ reconnecting wsrpc Diffstat:
| M | src/custom/wsrpc.js | | | 3 | ++- |
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/custom/wsrpc.js b/src/custom/wsrpc.js @@ -56,7 +56,8 @@ module.exports = function (location, options, callback) { // Destroy old stream if (ws) { - ws.destroy(); + if ('function' === ws.close ) ws.close(); + if ('function' === ws.destroy) ws.destroy(); ws = false; }