From 05e2018d3a8c88ae5dadfc13b77613aa04617284 Mon Sep 17 00:00:00 2001 From: fiatjaf Date: Sun, 6 Apr 2025 09:40:53 -0300 Subject: [PATCH] exit BatchedSubManyEose() immediately as the context expires. I'm not sure about this, but seems to work. --- pool.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pool.go b/pool.go index eb52dee..63c86cc 100644 --- a/pool.go +++ b/pool.go @@ -777,9 +777,10 @@ func (pool *SimplePool) BatchedSubManyEose( select { case res <- ie: case <-ctx.Done(): + wg.Done() + return } } - wg.Done() }(df) }