mirror of
https://github.com/DeviceFarmer/stf.git
synced 2026-04-18 13:53:22 +02:00
Proxy server was throwing errors on socket hangups (e.g. tab closed), causing the device process to die.
This commit is contained in:
@@ -87,12 +87,18 @@ module.exports = syrup.serial()
|
||||
resolver.reject(err)
|
||||
}
|
||||
|
||||
function ignore() {
|
||||
// No-op
|
||||
}
|
||||
|
||||
var proxy = httpProxy.createProxyServer({
|
||||
target: url
|
||||
, ws: false
|
||||
, xfwd: false
|
||||
})
|
||||
|
||||
proxy.on('error', ignore)
|
||||
|
||||
var proxyServer = http.createServer(function(req, res) {
|
||||
proxy.web(req, res)
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user