mirror of
https://github.com/nbd-wtf/go-nostr.git
synced 2025-06-23 15:21:20 +02:00
use context passed to .Connect() for the live of the relay.
This commit is contained in:
parent
e84a7936d5
commit
30e0e1040a
2
relay.go
2
relay.go
@ -73,7 +73,7 @@ func (r *Relay) String() string {
|
||||
// Once successfully connected, context expiration has no effect: call r.Close
|
||||
// to close the connection.
|
||||
func (r *Relay) Connect(ctx context.Context) error {
|
||||
connectionContext, cancel := context.WithCancel(context.Background())
|
||||
connectionContext, cancel := context.WithCancel(ctx)
|
||||
r.ConnectionContext = connectionContext
|
||||
|
||||
if r.URL == "" {
|
||||
|
Loading…
x
Reference in New Issue
Block a user