use if ctx.Err() instead of select {}.

This commit is contained in:
fiatjaf
2026-02-22 17:45:36 -03:00
parent 55cc52876a
commit 7aa127a8c3
+1 -3
View File
@@ -484,10 +484,8 @@ func (pool *Pool) subMany(
hasAuthed := false hasAuthed := false
interval := 3 * time.Second interval := 3 * time.Second
for { for {
select { if ctx.Err() != nil {
case <-ctx.Done():
return return
default:
} }
var sub *Subscription var sub *Subscription