Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
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
b45c8979
Commit
b45c8979
authored
8 years ago
by
Jeromy Johnson
Committed by
GitHub
8 years ago
Browse files
Options
Download
Plain Diff
Merge pull request #104 from libp2p/fix/secio-hs-errs
swarm: externalize secio handshake errors
parents
06db4004
5758d3e6
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
p2p/net/swarm/swarm_dial.go
+2
-1
p2p/net/swarm/swarm_dial.go
with
2 additions
and
1 deletion
+2
-1
p2p/net/swarm/swarm_dial.go
View file @
b45c8979
...
...
@@ -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...
...
...
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
Menu
Projects
Groups
Snippets
Help