Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
adam.huang
go-libp2p
Commits
bb971794
Commit
bb971794
authored
Sep 02, 2018
by
Steven Allen
Browse files
disable mdns logging from init
(avoids the race condition)
parent
0d38750d
Changes
1
Hide whitespace changes
Inline
Side-by-side
p2p/discovery/mdns.go
View file @
bb971794
...
...
@@ -17,6 +17,11 @@ import (
"github.com/whyrusleeping/mdns"
)
func
init
()
{
// don't let mdns use logging...
mdns
.
DisableLogging
=
true
}
var
log
=
logging
.
Logger
(
"mdns"
)
const
ServiceTag
=
"_ipfs-discovery._udp"
...
...
@@ -62,9 +67,6 @@ func getDialableListenAddrs(ph host.Host) ([]*net.TCPAddr, error) {
func
NewMdnsService
(
ctx
context
.
Context
,
peerhost
host
.
Host
,
interval
time
.
Duration
,
serviceTag
string
)
(
Service
,
error
)
{
// don't let mdns use logging...
mdns
.
DisableLogging
=
true
var
ipaddrs
[]
net
.
IP
port
:=
4001
...
...
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