1
0
Fork 0
mirror of https://github.com/openstf/stf synced 2025-10-06 03:50:04 +02:00

The screen websocket now sends ping messages every now and then, so that it won't get caught by nginx's proxy_read_timeout if the screen is off or not moving. Previously, nginx may have decided to kill the connection after a period of no activity.

This commit is contained in:
Simo Kinnunen 2017-01-25 17:46:23 +09:00
parent d1602e6b79
commit 5e9aa427e9
3 changed files with 43 additions and 35 deletions

View file

@ -85,6 +85,12 @@ module.exports.builder = function(yargs) {
, type: 'number'
, default: process.env.SCREEN_JPEG_QUALITY || 80
})
.option('screen-ping-interval', {
describe: 'The interval at which to send ping messages to keep the ' +
'screen WebSocket alive.'
, type: 'number'
, default: 30000
})
.option('screen-port', {
describe: 'Port allocated to the screen WebSocket.'
, type: 'number'
@ -129,9 +135,10 @@ module.exports.handler = function(argv) {
, storageUrl: argv.storageUrl
, adbHost: argv.adbHost
, adbPort: argv.adbPort
, screenWsUrlPattern: argv.screenWsUrlPattern
, screenJpegQuality: argv.screenJpegQuality
, screenPingInterval: argv.screenPingInterval
, screenPort: argv.screenPort
, screenWsUrlPattern: argv.screenWsUrlPattern
, connectUrlPattern: argv.connectUrlPattern
, connectPort: argv.connectPort
, vncPort: argv.vncPort

View file

@ -104,6 +104,12 @@ module.exports.builder = function(yargs) {
, type: 'number'
, default: process.env.SCREEN_JPEG_QUALITY || 80
})
.option('screen-ping-interval', {
describe: 'The interval at which to send ping messages to keep the ' +
'screen WebSocket alive.'
, type: 'number'
, default: 30000
})
.option('screen-ws-url-pattern', {
describe: 'The URL pattern to use for the screen WebSocket.'
, type: 'string'
@ -163,8 +169,9 @@ module.exports.handler = function(argv) {
, '--storage-url', argv.storageUrl
, '--adb-host', argv.adbHost
, '--adb-port', argv.adbPort
, '--screen-ws-url-pattern', argv.screenWsUrlPattern
, '--screen-jpeg-quality', argv.screenJpegQuality
, '--screen-ping-interval', argv.screenPingInterval
, '--screen-ws-url-pattern', argv.screenWsUrlPattern
, '--connect-url-pattern', argv.connectUrlPattern
, '--heartbeat-interval', argv.heartbeatInterval
, '--boot-complete-timeout', argv.bootCompleteTimeout