Improve Add source/test reliability.

This commit is contained in:
Jay
2026-04-15 13:56:58 -04:00
parent d002c19889
commit be77bc53d0
2 changed files with 12 additions and 7 deletions
+4
View File
@@ -113,6 +113,10 @@ func (p *Pool) Add(rawURL string) error {
// Check for existing connection in pool
p.mu.Lock()
if p.closed {
p.mu.Unlock()
return errors.NewPoolError("pool is closed")
}
_, exists := p.connections[url]
p.mu.Unlock()