1
0
Fork 0
mirror of https://github.com/openstf/stf synced 2025-10-05 19:42:01 +02:00

Set TCP_KEEPALIVE socket option to fix tcp_connection problem in

some network. Issue-100
This commit is contained in:
Vishal Banthia 2015-10-09 15:48:18 +09:00
parent 58e25c0f65
commit 6c741cbf4b
10 changed files with 38 additions and 25 deletions

View file

@ -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) {