mirror of
https://github.com/DeviceFarmer/stf.git
synced 2026-04-18 02:53:19 +02:00
Set TCP_KEEPALIVE socket option to fix tcp_connection problem in
some network. Issue-100
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
var adb = require('adbkit')
|
||||
var Promise = require('bluebird')
|
||||
var zmq = require('zmq')
|
||||
var _ = require('lodash')
|
||||
var EventEmitter = require('eventemitter3').EventEmitter
|
||||
|
||||
@@ -11,6 +10,7 @@ var wirerouter = require('../../wire/router')
|
||||
var procutil = require('../../util/procutil')
|
||||
var lifecycle = require('../../util/lifecycle')
|
||||
var srv = require('../../util/srv')
|
||||
var zmqutil = require('../../util/zmqutil')
|
||||
|
||||
module.exports = function(options) {
|
||||
var log = logger.createLogger('provider')
|
||||
@@ -70,7 +70,7 @@ module.exports = function(options) {
|
||||
})()
|
||||
|
||||
// Output
|
||||
var push = zmq.socket('push')
|
||||
var push = zmqutil.socket('push')
|
||||
Promise.map(options.endpoints.push, function(endpoint) {
|
||||
return srv.resolve(endpoint).then(function(records) {
|
||||
return srv.attempt(records, function(record) {
|
||||
@@ -86,7 +86,7 @@ module.exports = function(options) {
|
||||
})
|
||||
|
||||
// Input
|
||||
var sub = zmq.socket('sub')
|
||||
var sub = zmqutil.socket('sub')
|
||||
Promise.map(options.endpoints.sub, function(endpoint) {
|
||||
return srv.resolve(endpoint).then(function(records) {
|
||||
return srv.attempt(records, function(record) {
|
||||
|
||||
Reference in New Issue
Block a user