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
bdad3bae
Commit
bdad3bae
authored
Apr 28, 2015
by
Henry
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
protocolEOF: demoted EOF to Debug, kept the else as Warning
parent
ba977813
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
3 deletions
+6
-3
p2p/host/basic/basic_host.go
p2p/host/basic/basic_host.go
+6
-3
No files found.
p2p/host/basic/basic_host.go
View file @
bdad3bae
...
...
@@ -98,9 +98,9 @@ func (h *BasicHost) newStreamHandler(s inet.Stream) {
protoID
,
handle
,
err
:=
h
.
Mux
()
.
ReadHeader
(
s
)
if
err
!=
nil
{
if
err
==
io
.
EOF
{
log
.
Warnin
gf
(
"protocol EOF: %s"
,
s
.
Conn
()
.
RemotePeer
())
log
.
Debu
gf
(
"protocol EOF: %s"
,
s
.
Conn
()
.
RemotePeer
())
}
else
{
log
.
Errorf
(
"protocol mux failed: %s"
,
err
)
log
.
Warning
(
"protocol mux failed: %s"
,
err
)
}
return
}
...
...
@@ -120,7 +120,7 @@ func (h *BasicHost) Peerstore() peer.Peerstore {
return
h
.
Network
()
.
Peerstore
()
}
// Network
s
returns the Network interface of the Host
// Network returns the Network interface of the Host
func
(
h
*
BasicHost
)
Network
()
inet
.
Network
{
return
h
.
network
}
...
...
@@ -130,6 +130,7 @@ func (h *BasicHost) Mux() *protocol.Mux {
return
h
.
mux
}
// IDService returns
func
(
h
*
BasicHost
)
IDService
()
*
identify
.
IDService
{
return
h
.
ids
}
...
...
@@ -142,6 +143,7 @@ func (h *BasicHost) SetStreamHandler(pid protocol.ID, handler inet.StreamHandler
h
.
Mux
()
.
SetHandler
(
pid
,
handler
)
}
// RemoveStreamHandler returns ..
func
(
h
*
BasicHost
)
RemoveStreamHandler
(
pid
protocol
.
ID
)
{
h
.
Mux
()
.
RemoveHandler
(
pid
)
}
...
...
@@ -238,6 +240,7 @@ func (h *BasicHost) Close() error {
return
h
.
proc
.
Close
()
}
// GetBandwidthReporter exposes the Host's bandiwth metrics reporter
func
(
h
*
BasicHost
)
GetBandwidthReporter
()
metrics
.
Reporter
{
return
h
.
bwc
}
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