mirror of
https://github.com/DeviceFarmer/stf.git
synced 2026-04-19 00:23:25 +02:00
Reset owner and reverse forwards when a dead worker restarts. This should prevent ghost owners from staying in the device list.
This commit is contained in:
@@ -134,6 +134,18 @@ module.exports = function(options) {
|
||||
}
|
||||
})
|
||||
})
|
||||
.on(wire.DeviceReadyMessage, function(channel, message) {
|
||||
socket.emit('device.change', {
|
||||
important: true
|
||||
, data: {
|
||||
serial: message.serial
|
||||
, channel: message.channel
|
||||
, owner: null // @todo Get rid of need to reset this here.
|
||||
, ready: true
|
||||
, reverseForwards: [] // @todo Get rid of need to reset this here.
|
||||
}
|
||||
})
|
||||
})
|
||||
.on(wire.DevicePresentMessage, function(channel, message) {
|
||||
socket.emit('device.change', {
|
||||
important: true
|
||||
@@ -192,7 +204,6 @@ module.exports = function(options) {
|
||||
})
|
||||
.on(wire.DeviceIdentityMessage, function(channel, message) {
|
||||
datautil.applyData(message)
|
||||
message.ready = true
|
||||
socket.emit('device.change', {
|
||||
important: true
|
||||
, data: message
|
||||
|
||||
Reference in New Issue
Block a user