Skip to content

Commit

Permalink
Updater: check for an active internet connection before trying to pul…
Browse files Browse the repository at this point in the history
…l feeds from the web
  • Loading branch information
line0 committed Jul 26, 2015
1 parent 2d149f7 commit 1255393
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions modules/DependencyControl/Updater.moon
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ class UpdaterBase
[4]: "No remaining feed available to %s %s '%s' from."
[6]: "The %s of %s '%s' failed because no suitable package could be found %s."
[5]: "Skipped %s of %s '%s': Another update initiated by %s is already running."
[7]: "Skipped %s of %s '%s': An internet connection is currently not available."
[10]: "Skipped %s of %s '%s': the update task is already running."
[15]: "Couldn't %s %s '%s' because its requirements could not be satisfied:"
[30]: "Couldn't %s %s '%s': failed to create temporary download directory %s"
Expand Down Expand Up @@ -178,6 +179,9 @@ class UpdateTask extends UpdaterBase

return logUpdateError -4

-- check internet connection
return logUpdateError -7 unless dlm\isInternetConnected!

-- get a lock on the updater
success, otherHost = @updater\getLock waitLock
return logUpdateError -5, otherHost unless success
Expand Down

0 comments on commit 1255393

Please sign in to comment.