Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
mybee
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
vicotor
mybee
Commits
db8edb53
Unverified
Commit
db8edb53
authored
Oct 26, 2020
by
Janoš Guljaš
Committed by
GitHub
Oct 26, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
disable port reuse in libp2p (#868)
parent
8bd9e28b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
1 deletion
+7
-1
go.mod
go.mod
+1
-0
libp2p.go
pkg/p2p/libp2p/libp2p.go
+6
-1
No files found.
go.mod
View file @
db8edb53
...
...
@@ -28,6 +28,7 @@ require (
github.com/libp2p/go-libp2p-discovery v0.5.0 // indirect
github.com/libp2p/go-libp2p-peerstore v0.2.6
github.com/libp2p/go-libp2p-quic-transport v0.8.0
github.com/libp2p/go-libp2p-transport-upgrader v0.3.0
github.com/libp2p/go-openssl v0.0.6 // indirect
github.com/libp2p/go-tcp-transport v0.2.0
github.com/libp2p/go-ws-transport v0.3.1
...
...
pkg/p2p/libp2p/libp2p.go
View file @
db8edb53
...
...
@@ -34,6 +34,7 @@ import (
protocol
"github.com/libp2p/go-libp2p-core/protocol"
"github.com/libp2p/go-libp2p-peerstore/pstoremem"
libp2pquic
"github.com/libp2p/go-libp2p-quic-transport"
tptu
"github.com/libp2p/go-libp2p-transport-upgrader"
basichost
"github.com/libp2p/go-libp2p/p2p/host/basic"
"github.com/libp2p/go-tcp-transport"
ws
"github.com/libp2p/go-ws-transport"
...
...
@@ -146,7 +147,11 @@ func New(ctx context.Context, signer beecrypto.Signer, networkID uint64, overlay
}
transports
:=
[]
libp2p
.
Option
{
libp2p
.
Transport
(
tcp
.
NewTCPTransport
),
libp2p
.
Transport
(
func
(
u
*
tptu
.
Upgrader
)
*
tcp
.
TcpTransport
{
t
:=
tcp
.
NewTCPTransport
(
u
)
t
.
DisableReuseport
=
true
return
t
}),
}
if
o
.
EnableWS
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment