reduce pool.EnsureRelay() timeout to 7s.

This commit is contained in:
fiatjaf
2025-05-04 20:21:33 -03:00
parent a2e05e6f3d
commit 3f87ec329d

View File

@@ -149,7 +149,7 @@ func (pool *Pool) EnsureRelay(url string) (*Relay, error) {
// we use this ctx here so when the pool dies everything dies // we use this ctx here so when the pool dies everything dies
ctx, cancel := context.WithTimeoutCause( ctx, cancel := context.WithTimeoutCause(
pool.Context, pool.Context,
time.Second*15, time.Second*7,
errors.New("connecting to the relay took too long"), errors.New("connecting to the relay took too long"),
) )
defer cancel() defer cancel()