mirror of
https://github.com/balena-os/balena-supervisor.git
synced 2025-02-22 10:21:01 +00:00
Use a 10s timeout for the connectivity check to make the internet connectivity check more responsive.
This commit is contained in:
parent
bf0b38354f
commit
49d6e3142c
@ -69,7 +69,9 @@ exports.checkConnectivity = ->
|
|||||||
# We avoid using ICMP as this traffic is sometimes restricted/dropped. Good
|
# We avoid using ICMP as this traffic is sometimes restricted/dropped. Good
|
||||||
# ol' port 80 HTTP should always be available :-)
|
# ol' port 80 HTTP should always be available :-)
|
||||||
request
|
request
|
||||||
.getAsync(config.heartbeatEndpoint)
|
.getAsync
|
||||||
|
url: config.heartbeatEndpoint
|
||||||
|
timeout: 10000
|
||||||
.spread (response) ->
|
.spread (response) ->
|
||||||
return response.statusCode in [ 200, 304 ]
|
return response.statusCode in [ 200, 304 ]
|
||||||
.catch ->
|
.catch ->
|
||||||
|
Loading…
x
Reference in New Issue
Block a user