check .send exists before running heartbeat

This commit is contained in:
sparks-alec
2023-01-04 05:15:46 -05:00
parent 77e0d59864
commit fe57a2af52
+1 -1
View File
@@ -299,7 +299,7 @@ function heartbeat() {
initDeviceConnection(deviceID);
} else if (Date.now() - d.lastMessage > d.heartbeatTimeout) {
infoUpdate(d, 'status', 'broken');
} else if (d.port !== undefined && d.addresses.length > 0) {
} else if (d.port !== undefined && d.addresses.length > 0 && d.send) {
PLUGINS.all[d.type].heartbeat(d);
} else {
//