mirror of
https://github.com/fiatjaf/nak.git
synced 2025-12-08 16:48:51 +00:00
fix for nil error case on publish.
This commit is contained in:
3
event.go
3
event.go
@@ -222,7 +222,8 @@ example:
|
|||||||
ctx, cancel := context.WithTimeout(c.Context, 10*time.Second)
|
ctx, cancel := context.WithTimeout(c.Context, 10*time.Second)
|
||||||
defer cancel()
|
defer cancel()
|
||||||
|
|
||||||
if err := relay.Publish(ctx, evt); err == nil {
|
err := relay.Publish(ctx, evt)
|
||||||
|
if err == nil {
|
||||||
// published fine
|
// published fine
|
||||||
log("success.\n")
|
log("success.\n")
|
||||||
continue nextline
|
continue nextline
|
||||||
|
|||||||
Reference in New Issue
Block a user