From 0791bad973422d5fc50557d9dff7531e166ba80a Mon Sep 17 00:00:00 2001 From: Christopher Jeffrey Date: Thu, 2 Mar 2017 11:58:26 -0800 Subject: [PATCH] upnp: do not throw when getting network interfaces. --- lib/net/upnp.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/net/upnp.js b/lib/net/upnp.js index 6fa802e3..2c8a2897 100644 --- a/lib/net/upnp.js +++ b/lib/net/upnp.js @@ -323,7 +323,11 @@ UPNP.getInterfaceIP = function getInterfaceIP(name, family) { if (type !== family) continue; - ip = IP.toBuffer(details.address); + try { + ip = IP.toBuffer(details.address); + } catch (e) { + continue; + } if (IP.isLocal(ip)) continue;