1
0
Fork 0
mirror of https://github.com/openstf/stf synced 2025-10-05 02:29:26 +02:00

When receiving an introduction message, silently drop any previous value in the reaper. Fixes a bug where restarting a provider would not bring the devices online due to it starting within the heartbeat ttl, leading the reaper to believe it has been connected all along.

This commit is contained in:
Simo Kinnunen 2015-06-05 10:58:03 +09:00
parent 7a4ee783bc
commit c9c892c69d

View file

@ -92,6 +92,7 @@ module.exports = function(options) {
function listenToChanges() { function listenToChanges() {
sub.on('message', wirerouter() sub.on('message', wirerouter()
.on(wire.DeviceIntroductionMessage, function(channel, message) { .on(wire.DeviceIntroductionMessage, function(channel, message) {
ttlset.drop(message.serial, TtlSet.SILENT)
ttlset.bump(message.serial, Date.now()) ttlset.bump(message.serial, Date.now())
}) })
.on(wire.DeviceHeartbeatMessage, function(channel, message) { .on(wire.DeviceHeartbeatMessage, function(channel, message) {