From fd93edf0eb3b5978397d0197bb107d6829793c03 Mon Sep 17 00:00:00 2001 From: Ylian Saint-Hilaire Date: Sat, 14 Nov 2020 22:14:02 -0800 Subject: [PATCH] Fixed server crash on device file download. --- meshdevicefile.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meshdevicefile.js b/meshdevicefile.js index 1d65e2e9..7c0e9cce 100644 --- a/meshdevicefile.js +++ b/meshdevicefile.js @@ -202,7 +202,7 @@ module.exports.CreateMeshDeviceFile = function (parent, ws, res, req, domain, us } } else { // HTTP connection, Send message to other peers that we have this connection - parent.parent.multiServer.DispatchMessage(JSON.stringify({ action: 'relay', id: obj.id })); + if (parent.parent.multiServer != null) { parent.parent.multiServer.DispatchMessage(JSON.stringify({ action: 'relay', id: obj.id })); } return; } }