From d859a5fab8a198ad5df7bfef9fcc052e8e460d96 Mon Sep 17 00:00:00 2001 From: roks0n Date: Sun, 21 Jul 2019 18:55:59 +0200 Subject: [PATCH] add error listener so the app isnt killed when throwing error --- package.json | 2 +- src/peer.js | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index 33361ec..f3d9453 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@deadlock-delegate/crawler", - "version": "1.2.3", + "version": "1.2.4", "description": "Crawler scans the ARK network to get information about the peers in the network.", "main": "src/crawler.js", "scripts": { diff --git a/src/peer.js b/src/peer.js index a5731fe..50c0019 100644 --- a/src/peer.js +++ b/src/peer.js @@ -11,6 +11,7 @@ class Peers { return connection } connection = SocketClient.create({ hostname: ip, port }) + connection.on('error', (err) => console.error(err)) this.connections.set(ip, connection) return connection }