Configurable connection request timeout
This commit is contained in:
1 parent
8e34c6a2f6
commit
595c318720
2 files changed
+3
-1
No files matched your search
@@ -136,6 +136,7 @@ httpConReq = (url, username, password, timeout, callback) ->
|
||||
|
||||
|
||||
connectionRequest = (deviceId, callback) ->
|
||||
CONNECTION_REQUEST_TIMEOUT = config.get('CONNECTION_REQUEST_TIMEOUT', deviceId)
|
||||
proj = {
|
||||
'Device.ManagementServer.ConnectionRequestURL._value' : 1,
|
||||
'Device.ManagementServer.UDPConnectionRequestAddress._value' : 1,
|
||||
@@ -165,7 +166,7 @@ connectionRequest = (deviceId, callback) ->
|
||||
if udpConnectionRequestAddress
|
||||
udpConReq(udpConnectionRequestAddress, username, password, (err) -> throw err if err)
|
||||
|
||||
httpConReq(connectionRequestUrl, username, password, 2000, (err) ->
|
||||
httpConReq(connectionRequestUrl, username, password, CONNECTION_REQUEST_TIMEOUT, (err) ->
|
||||
if udpConnectionRequestAddress
|
||||
return callback()
|
||||
callback(err)
|
||||
|
||||
Reference in new issue
Block a user