mirror of
https://github.com/nbd-wtf/go-nostr.git
synced 2025-08-03 16:32:10 +02:00
Subscription.Fire() can error, so Relay.Subscribe() must also.
This commit is contained in:
@@ -2,6 +2,7 @@ package nostr
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"strconv"
|
||||
"sync"
|
||||
)
|
||||
@@ -70,7 +71,7 @@ func (sub *Subscription) Fire() error {
|
||||
err := sub.conn.WriteJSON(message)
|
||||
if err != nil {
|
||||
sub.cancel()
|
||||
return err
|
||||
return fmt.Errorf("failed to write: %w", err)
|
||||
}
|
||||
|
||||
// the subscription ends once the context is canceled
|
||||
|
Reference in New Issue
Block a user