Skip to content

Commit 56d4b2f

Browse files
committed
disable pooling by default
1 parent 3c57ce5 commit 56d4b2f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Diff for: share/shwap/p2p/bitswap/getter.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ import (
2424
"github.com/celestiaorg/celestia-node/share/shwap"
2525
)
2626

27-
var disablePooling = os.Getenv("CELESTIA_BITSWAP_DISABLE_POOLING") == "1"
27+
var enablePooling = os.Getenv("CELESTIA_BITSWAP_ENABLE_POOLING") == "1"
2828

2929
var tracer = otel.Tracer("shwap/bitswap")
3030

@@ -278,7 +278,7 @@ func (g *Getter) isArchival(hdr *header.ExtendedHeader) bool {
278278

279279
// getSession takes a session out of the respective session pool
280280
func (g *Getter) getSession(isArchival bool) (ses exchange.Fetcher, release func()) {
281-
if disablePooling {
281+
if !enablePooling {
282282
ctx, cancel := context.WithCancel(context.Background())
283283
f := g.exchange.NewSession(ctx)
284284
return f, cancel

0 commit comments

Comments
 (0)