mirror of
https://github.com/nbd-wtf/go-nostr.git
synced 2025-04-01 00:18:12 +02:00
return status from publish when relay loses connectivity.
This commit is contained in:
parent
332ae1ff7f
commit
cef5892bce
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
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user