Use a 10s timeout for the connectivity check to make the internet connectivity check more responsive.

This commit is contained in:
Pagan Gazzard 2014-12-10 20:49:54 +00:00 committed by Pablo Carranza Vélez
parent bf0b38354f
commit 49d6e3142c

View File

@ -69,7 +69,9 @@ exports.checkConnectivity = ->
# We avoid using ICMP as this traffic is sometimes restricted/dropped. Good
# ol' port 80 HTTP should always be available :-)
request
.getAsync(config.heartbeatEndpoint)
.getAsync
url: config.heartbeatEndpoint
timeout: 10000
.spread (response) ->
return response.statusCode in [ 200, 304 ]
.catch ->