| 1 |
// Copyright 2026 The Go Authors. All rights reserved. |
| 2 |
// Use of this source code is governed by a BSD-style |
| 3 |
// license that can be found in the LICENSE file. |
| 4 |
|
| 5 |
//go:build !nethttpomithttp2 |
| 6 |
|
| 7 |
package http |
| 8 |
|
| 9 |
import "sync" |
| 10 |
|
| 11 |
// ResetPools reinitializes pools containing channels. |
| 12 |
// Call this at the start and end of any test using synctest, |
| 13 |
// to avoid leaking bubbled channels into/out of bubbles. |
| 14 |
func ResetPools() { |
| 15 |
http2errChanPool = sync.Pool{ |
| 16 |
New: func() any { return make(chan error, 1) }, |
| 17 |
} |
| 18 |
} |