Fix bug preventing heartbeats from happening

d.port is undefined on all plugins now! So heartbeats basically never happened! Devices would then time out and attempt to reconnect, do that, and then redraw.
This commit is contained in:
sparks-alec
2023-10-01 01:42:58 -04:00
parent f433a9983c
commit c5b5d350f2
+1 -1
View File
@@ -353,7 +353,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 && d.send) {
} else if ((d.remotePort !== undefined || d.defaultPort !== undefined) && d.addresses.length > 0 && d.send) {
PLUGINS.all[d.type].heartbeat(d);
} else {
//