Skip to content

Commit

Permalink
fix for nil error case on publish.
Browse files Browse the repository at this point in the history
  • Loading branch information
fiatjaf committed Dec 10, 2023
1 parent bfa7264 commit 2d1e27f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion event.go
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,8 @@ example:
ctx, cancel := context.WithTimeout(c.Context, 10*time.Second)
defer cancel()

if err := relay.Publish(ctx, evt); err == nil {
err := relay.Publish(ctx, evt)
if err == nil {
// published fine
log("success.\n")
continue nextline
Expand Down

0 comments on commit 2d1e27f

Please sign in to comment.