We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3c57ce5 commit 56d4b2fCopy full SHA for 56d4b2f
share/shwap/p2p/bitswap/getter.go
@@ -24,7 +24,7 @@ import (
24
"github.com/celestiaorg/celestia-node/share/shwap"
25
)
26
27
-var disablePooling = os.Getenv("CELESTIA_BITSWAP_DISABLE_POOLING") == "1"
+var enablePooling = os.Getenv("CELESTIA_BITSWAP_ENABLE_POOLING") == "1"
28
29
var tracer = otel.Tracer("shwap/bitswap")
30
@@ -278,7 +278,7 @@ func (g *Getter) isArchival(hdr *header.ExtendedHeader) bool {
278
279
// getSession takes a session out of the respective session pool
280
func (g *Getter) getSession(isArchival bool) (ses exchange.Fetcher, release func()) {
281
- if disablePooling {
+ if !enablePooling {
282
ctx, cancel := context.WithCancel(context.Background())
283
f := g.exchange.NewSession(ctx)
284
return f, cancel
0 commit comments