mirror of
https://github.com/nbd-wtf/go-nostr.git
synced 2025-08-02 07:52:12 +02:00
Write returns an error in a channel (why? I think it makes no difference.)
This commit is contained in:
@@ -88,7 +88,7 @@ func (sub *Subscription) Fire() error {
|
||||
debugLog("{%s} sending %v", sub.Relay.URL, reqb)
|
||||
|
||||
sub.live = true
|
||||
if err := sub.Relay.Write(reqb); err != nil {
|
||||
if err := <-sub.Relay.Write(reqb); err != nil {
|
||||
sub.cancel()
|
||||
return fmt.Errorf("failed to write: %w", err)
|
||||
}
|
||||
|
Reference in New Issue
Block a user