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-secio
Commits
94b91345
Unverified
Commit
94b91345
authored
Jun 15, 2019
by
Steven Allen
Committed by
GitHub
Jun 15, 2019
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #50 from libp2p/fix/wait-on-handshake
fix: wait for handshake to complete before returning
parents
20781608
d81b4538
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
1 deletion
+4
-1
protocol.go
protocol.go
+4
-1
No files found.
protocol.go
View file @
94b91345
...
...
@@ -125,9 +125,12 @@ func (s *secureSession) runHandshake(ctx context.Context) error {
var
err
error
select
{
case
<-
ctx
.
Done
()
:
err
=
ctx
.
Err
()
// State unknown. We *have* to close this.
s
.
insecure
.
Close
()
err
=
ctx
.
Err
()
// Wait for the handshake to return.
<-
result
case
err
=
<-
result
:
}
return
err
...
...
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