Spread is neater.

This commit is contained in:
Lorenzo Stoakes 2014-09-30 19:02:13 +01:00 committed by Pablo Carranza Vélez
parent aa4ff76581
commit 8ce9c2448f

View File

@ -61,7 +61,7 @@ exports.checkConnectivity = ->
# ol' port 80 HTTP should always be available :-)
request
.getAsync(config.heartbeatEndpoint)
.then ([ response ]) ->
.spread (response) ->
return response.statusCode in [ 200, 304 ]
.catch ->
return false