Skip to content

Commit 4b161b3

Browse files
committed
exclude tcp and tcpreuse from JS as well
1 parent c162d21 commit 4b161b3

File tree

17 files changed

+42
-10
lines changed

17 files changed

+42
-10
lines changed

config/config_js.go

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@ import (
3333
relayv2 "github.com/libp2p/go-libp2p/p2p/protocol/circuitv2/relay"
3434
"github.com/libp2p/go-libp2p/p2p/protocol/holepunch"
3535
"github.com/libp2p/go-libp2p/p2p/protocol/identify"
36-
"github.com/libp2p/go-libp2p/p2p/transport/tcpreuse"
3736
ma "github.com/multiformats/go-multiaddr"
3837
"github.com/prometheus/client_golang/prometheus"
3938
"go.uber.org/fx"
@@ -125,12 +124,6 @@ func (cfg *Config) addTransports() ([]fx.Option, error) {
125124
fx.Provide(func() connmgr.ConnectionGater { return cfg.ConnectionGater }),
126125
fx.Provide(func() pnet.PSK { return cfg.PSK }),
127126
fx.Provide(func() network.ResourceManager { return cfg.ResourceManager }),
128-
fx.Provide(func(upgrader transport.Upgrader) *tcpreuse.ConnMgr {
129-
if !cfg.ShareTCPListener {
130-
return nil
131-
}
132-
return tcpreuse.NewConnMgr(tcpreuse.EnvReuseportVal, upgrader)
133-
}),
134127
}
135128
fxopts = append(fxopts, cfg.Transports...)
136129
if cfg.Insecure {

p2p/net/swarm/peers_test.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
//go:build !js
2+
// +build !js
3+
14
package swarm_test
25

36
import (

p2p/transport/tcp/metrics.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//go:build !windows && !riscv64 && !loong64
1+
//go:build !js && !windows && !riscv64 && !loong64
22

33
package tcp
44

p2p/transport/tcp/metrics_general.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//go:build !linux && !darwin && !windows && !riscv64 && !loong64
1+
//go:build !linux && !darwin && !windows && !riscv64 && !loong64 && !js
22

33
package tcp
44

p2p/transport/tcp/metrics_none.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// riscv64 see: https://github.com/marten-seemann/tcp/pull/1
22

3-
//go:build windows || riscv64 || loong64
3+
//go:build windows || riscv64 || loong64 || js
44

55
package tcp
66

p2p/transport/tcp/metrics_test.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
//go:build !js
2+
// +build !js
3+
14
package tcp
25

36
import (

p2p/transport/tcp/tcp.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
//go:build !js
2+
// +build !js
3+
14
package tcp
25

36
import (

p2p/transport/tcp/tcp_test.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
//go:build !js
2+
// +build !js
3+
14
package tcp
25

36
import (

p2p/transport/tcpreuse/connwithscope.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
//go:build !js
2+
// +build !js
3+
14
package tcpreuse
25

36
import (

p2p/transport/tcpreuse/demultiplex.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
//go:build !js
2+
// +build !js
3+
14
package tcpreuse
25

36
import (

0 commit comments

Comments
 (0)