pshima / consul-snapshot

consul-snapshot is a backup and restore utility for Consul (https://www.consul.io). This is slightly different than some other utilities out there as this runs as a daemon for backups and ships them to S3. Also has integrated monitoring and backup health checks.
Apache License 2.0
116 stars 35 forks source link

Return immediately when an error occurs #3

Closed iverberk closed 8 years ago

iverberk commented 8 years ago

lastBackup.value will give a "runtime error: invalid memory address or nil pointer dereference" if lastBackup is nil. The http error should just be returned to the caller and stop further processing of the health check.

pshima commented 8 years ago

Thanks for the fix!