Extend group timeout on any adb connect activity.

This commit is contained in:
Simo Kinnunen
2014-07-18 17:39:40 +09:00
parent 74f7328b32
commit cf48f4714c
2 changed files with 9 additions and 0 deletions

View File

@@ -35,6 +35,9 @@ module.exports = syrup.serial()
server.on('connection', function(conn) {
log.info('New remote ADB connection from %s', conn.remoteAddress)
conn.on('userActivity', function() {
group.keepalive()
})
})
server.on('error', reject)

View File

@@ -66,6 +66,12 @@ module.exports = syrup.serial()
})
}
plugin.keepalive = function() {
if (currentGroup) {
channels.keepalive(currentGroup.group)
}
}
plugin.leave = function() {
return plugin.get()
.then(function(group) {