mirror of
https://github.com/openstf/stf
synced 2025-10-05 02:29:26 +02:00
Set TCP_KEEPALIVE socket option to fix tcp_connection problem in
some network. Issue-100
This commit is contained in:
parent
58e25c0f65
commit
6c741cbf4b
10 changed files with 38 additions and 25 deletions
|
@ -1,5 +1,4 @@
|
|||
var Promise = require('bluebird')
|
||||
var zmq = require('zmq')
|
||||
|
||||
var logger = require('../../util/logger')
|
||||
var wire = require('../../wire')
|
||||
|
@ -9,6 +8,7 @@ var dbapi = require('../../db/api')
|
|||
var lifecycle = require('../../util/lifecycle')
|
||||
var srv = require('../../util/srv')
|
||||
var TtlSet = require('../../util/ttlset')
|
||||
var zmqutil = require('../../util/zmqutil')
|
||||
|
||||
module.exports = function(options) {
|
||||
var log = logger.createLogger('reaper')
|
||||
|
@ -19,7 +19,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) {
|
||||
|
@ -41,7 +41,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) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue