mirror of
https://github.com/nbd-wtf/go-nostr.git
synced 2025-11-19 02:26:34 +01:00
PublishEvent() fixes.
This commit is contained in:
3
relay.go
3
relay.go
@@ -170,7 +170,7 @@ func (r *Relay) Connect() error {
|
||||
}
|
||||
|
||||
func (r Relay) Publish(event Event) chan Status {
|
||||
statusChan := make(chan Status)
|
||||
statusChan := make(chan Status, 4)
|
||||
|
||||
go func() {
|
||||
// we keep track of this so the OK message can be used to close it
|
||||
@@ -181,6 +181,7 @@ func (r Relay) Publish(event Event) chan Status {
|
||||
if err != nil {
|
||||
statusChan <- PublishStatusFailed
|
||||
close(statusChan)
|
||||
return
|
||||
}
|
||||
statusChan <- PublishStatusSent
|
||||
|
||||
|
||||
Reference in New Issue
Block a user