Skip to content

Commit 25d7ab8

Browse files
committed
enabled leep alives and remove max idle connections and max connections per host
1 parent 45349b1 commit 25d7ab8

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

exchange/fx_exchange.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -116,10 +116,10 @@ func NewFxExchange(h host.Host, ls ipld.LinkSystem, o ...Option) (*FxExchange, e
116116
return nil, err
117117
}
118118
tr := &http.Transport{
119-
DisableKeepAlives: true, // Ensure connections are not reused
120-
MaxIdleConns: 500,
121-
MaxConnsPerHost: 2000,
122-
IdleConnTimeout: 20 * time.Second,
119+
DisableKeepAlives: false, // Ensure connections are reused
120+
MaxIdleConns: 0,
121+
MaxConnsPerHost: 0,
122+
IdleConnTimeout: 60 * time.Second,
123123
// Include any other necessary transport configuration here
124124
}
125125
tr.RegisterProtocol("libp2p", p2phttp.NewTransport(h, p2phttp.ProtocolOption(FxExchangeProtocolID)))

0 commit comments

Comments
 (0)