mirror of
https://github.com/nbd-wtf/go-nostr.git
synced 2025-06-19 05:11:39 +02:00
fix test that was broken when the context passed to RelayConnect() became the relay context for its full timeline.
30e0e1040a8ee667508a538ac896d24f6ceaa8cd
This commit is contained in:
parent
ef428ff39f
commit
a666994ae7
@ -178,9 +178,7 @@ func makeKeyPair(t *testing.T) (priv, pub string) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func mustRelayConnect(url string) *Relay {
|
func mustRelayConnect(url string) *Relay {
|
||||||
ctx, cancel := context.WithTimeout(context.Background(), 2*time.Second)
|
rl, err := RelayConnect(context.Background(), url)
|
||||||
defer cancel()
|
|
||||||
rl, err := RelayConnect(ctx, url)
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
panic(err.Error())
|
panic(err.Error())
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user