diff --git a/event.go b/event.go index 6fa3e99..c143ac6 100644 --- a/event.go +++ b/event.go @@ -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