From e54feda878d3e213caf702c5296732731c7952b1 Mon Sep 17 00:00:00 2001 From: Mattias Erming Date: Sat, 3 Jan 2015 18:58:12 -0800 Subject: [PATCH] Fix crash on broken links --- src/plugins/irc-events/link.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/plugins/irc-events/link.js b/src/plugins/irc-events/link.js index b83a4a4..0481f44 100644 --- a/src/plugins/irc-events/link.js +++ b/src/plugins/irc-events/link.js @@ -89,7 +89,11 @@ function parse(msg, url, res, client) { } function fetch(url, cb) { - var req = request.get(url); + try { + var req = request.get(url); + } catch(e) { + return; + } var length = 0; var limit = 1024 * 10; req