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
3aef795c
Commit
3aef795c
authored
May 20, 2019
by
Steven Allen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
commands/p2p(fix): avoid creating empty multiaddrs
parent
b892db89
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
6 deletions
+14
-6
core/commands/p2p.go
core/commands/p2p.go
+14
-6
No files found.
core/commands/p2p.go
View file @
3aef795c
...
...
@@ -357,14 +357,22 @@ var p2pCloseCmd = &cmds.Command{
proto
:=
protocol
.
ID
(
protoOpt
)
listen
,
err
:=
ma
.
NewMultiaddr
(
listenOpt
)
if
err
!=
nil
{
return
err
var
(
target
,
listen
ma
.
Multiaddr
)
if
l
{
listen
,
err
=
ma
.
NewMultiaddr
(
listenOpt
)
if
err
!=
nil
{
return
err
}
}
target
,
err
:=
ma
.
NewMultiaddr
(
targetOpt
)
if
err
!=
nil
{
return
err
if
t
{
target
,
err
=
ma
.
NewMultiaddr
(
targetOpt
)
if
err
!=
nil
{
return
err
}
}
if
!
(
closeAll
||
p
||
l
||
t
)
{
...
...
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