Additional error check

This commit is contained in:
jamesread 2021-07-12 23:27:10 +01:00
parent 46829925fe
commit ef5e71fa94
1 changed files with 6 additions and 1 deletions

View File

@ -60,7 +60,12 @@ func StartUpdateChecker(currentVersion string, currentCommit string, cfg *config
func actualCheckForUpdate(payload updateRequest) {
jsonUpdateRequest, err := json.Marshal(payload)
req, err := http.NewRequest("POST", "http://update-check.olivetin.app", bytes.NewReader(jsonUpdateRequest))
if err != nil {
log.Errorf("Update check failed %v", err)
return
}
req, err := http.NewRequest("POST", "http://update-check.olivetin.app", bytes.NewBuffer(jsonUpdateRequest))
if err != nil {
log.Errorf("Update check failed %v", err)