Add config option for connection request timeout

Resolves: #148
This commit is contained in:
Zaid Abdulla committed 2016-05-18 01:02:01 +03:00
1 parent 9fde3ad5d5
commit 68b6a786bf
2 files changed
+2 -1

No files matched your search

+1 -1
View File
@@ -84,7 +84,7 @@ connectionRequest = (deviceId, callback) ->
)
request.on('socket', (socket) ->
socket.setTimeout(2000)
socket.setTimeout(config.get('CONNECTION_REQUEST_TIMEOUT', deviceId))
socket.on('timeout', () ->
request.abort()
)
+1
View File
@@ -50,6 +50,7 @@ options = {
GET_PARAMETER_NAMES_DEPTH_THRESHOLD : {type : 'int', default : 0},
TASK_PARAMETERS_BATCH_SIZE : {type : 'int', default : 32},
COOKIES_PATH : {type : 'string'},
CONNECTION_REQUEST_TIMEOUT : {type : 'int', default : 2000},
# Libxml related configuration
XML_PARSE_RECOVER : {type : 'bool'},