mirror of
https://github.com/nbd-wtf/go-nostr.git
synced 2025-08-03 08:22:12 +02:00
return status from publish when relay loses connectivity.
This commit is contained in:
3
relay.go
3
relay.go
@@ -280,6 +280,9 @@ func (r *Relay) Publish(ctx context.Context, event Event) (Status, error) {
|
||||
// but if it happens because okCallback was called then it might be "succeeded"
|
||||
// do not return if okCallback is in process
|
||||
return status, err
|
||||
case <-r.ConnectionContext.Done():
|
||||
// same as above, but when the relay loses connectivity entirely
|
||||
return status, err
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user