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:
parent
7a4ee783bc
commit
c9c892c69d
1 changed files with 1 additions and 0 deletions
|
@ -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) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue