Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
dms3
go-dms3
Commits
cf478af9
Commit
cf478af9
authored
9 years ago
by
Jeromy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cleanup changes from PR
parent
001b7ab7
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
9 deletions
+4
-9
core/core.go
core/core.go
+4
-3
p2p/discovery/mdns.go
p2p/discovery/mdns.go
+0
-6
No files found.
core/core.go
View file @
cf478af9
...
...
@@ -268,10 +268,11 @@ func (n *IpfsNode) startOnlineServices(ctx context.Context, routingOption Routin
if
do
!=
nil
{
service
,
err
:=
do
(
n
.
PeerHost
)
if
err
!=
nil
{
return
err
log
.
Error
(
"mdns error: "
,
err
)
}
else
{
service
.
RegisterNotifee
(
n
)
n
.
Discovery
=
service
}
service
.
RegisterNotifee
(
n
)
n
.
Discovery
=
service
}
return
n
.
Bootstrap
(
DefaultBootstrapConfig
)
...
...
This diff is collapsed.
Click to expand it.
p2p/discovery/mdns.go
View file @
cf478af9
...
...
@@ -2,13 +2,10 @@ package discovery
import
(
"errors"
"fmt"
"io"
"io/ioutil"
golog
"log"
"net"
//"strconv"
//"strings"
"sync"
"time"
...
...
@@ -75,8 +72,6 @@ func NewMdnsService(peerhost host.Host, interval time.Duration) (Service, error)
port
=
addr
.
Port
}
fmt
.
Println
(
"using port: "
,
port
)
myid
:=
peerhost
.
ID
()
.
Pretty
()
info
:=
[]
string
{
myid
}
...
...
@@ -135,7 +130,6 @@ func (m *mdnsService) pollForEntries() {
}
func
(
m
*
mdnsService
)
handleEntry
(
e
*
mdns
.
ServiceEntry
)
{
fmt
.
Println
(
"handling entry!"
)
mpeer
,
err
:=
peer
.
IDB58Decode
(
e
.
Info
)
if
err
!=
nil
{
log
.
Warning
(
"Error parsing peer ID from mdns entry: "
,
err
)
...
...
This diff is collapsed.
Click to expand it.
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