mirror of
https://github.com/nbd-wtf/go-nostr.git
synced 2025-07-02 19:43:13 +02:00
use different contexts for the relay connection lifetime and the Connect() call.
fixes https://github.com/nbd-wtf/go-nostr/pull/86
This commit is contained in:
@ -29,8 +29,8 @@ func TestSubscribe(t *testing.T) {
|
||||
events++
|
||||
case <-sub.EndOfStoredEvents:
|
||||
goto end
|
||||
case <-rl.ConnectionContext.Done():
|
||||
t.Errorf("connection closed: %v", rl.ConnectionContext.Err())
|
||||
case <-rl.Context().Done():
|
||||
t.Errorf("connection closed: %v", rl.Context().Err())
|
||||
goto end
|
||||
case <-timeout:
|
||||
t.Errorf("timeout")
|
||||
|
Reference in New Issue
Block a user