mirror of
https://github.com/DeviceFarmer/stf.git
synced 2026-04-19 00:23:25 +02:00
Set TCP_KEEPALIVE socket option to fix tcp_connection problem in
some network. Issue-100
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user