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
p2p
go-p2p-swarm
Commits
f9b5da1b
Commit
f9b5da1b
authored
Sep 05, 2016
by
Jeromy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
swarm: externalize secio handshake errors
parent
48ef0bb9
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
1 deletion
+2
-1
swarm_dial.go
swarm_dial.go
+2
-1
No files found.
swarm_dial.go
View file @
f9b5da1b
...
...
@@ -450,7 +450,8 @@ func (s *Swarm) dialAddr(ctx context.Context, p peer.ID, addr ma.Multiaddr) (con
remotep
:=
connC
.
RemotePeer
()
if
remotep
!=
p
{
connC
.
Close
()
return
nil
,
fmt
.
Errorf
(
"misdial to %s through %s (got %s)"
,
p
,
addr
,
remotep
)
_
,
err
:=
connC
.
Read
(
nil
)
// should return any potential errors (ex: from secio)
return
nil
,
fmt
.
Errorf
(
"misdial to %s through %s (got %s): %s"
,
p
,
addr
,
remotep
,
err
)
}
// if the connection is to ourselves...
...
...
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