Skip to content

Commit

Permalink
Merge pull request #285 from SputNikPlop/deferring
Browse files Browse the repository at this point in the history
fix: check error before deferring
  • Loading branch information
Xemdo committed Oct 30, 2023
2 parents 3cc0427 + 76fd24d commit 1b3a1c4
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion internal/events/trigger/retrigger_event.go
Expand Up @@ -51,11 +51,13 @@ func RefireEvent(id string, p TriggerParameters) (string, error) {
Type: EventSubMessageTypeNotification,
SubscriptionVersion: e.SubscriptionVersion(),
})
defer resp.Body.Close()

if err != nil {
return "", err
}

defer resp.Body.Close()

fmt.Printf("[%v] Endpoint received refired event.", resp.StatusCode)
}

Expand Down

0 comments on commit 1b3a1c4

Please sign in to comment.