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
mf
go-multiaddr
Commits
900a4d7e
Commit
900a4d7e
authored
Jan 21, 2021
by
aarshkshah1992
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix local addr use
parent
d18c05e0
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
1 deletion
+9
-1
net/net.go
net/net.go
+9
-1
No files found.
net/net.go
View file @
900a4d7e
...
...
@@ -255,7 +255,15 @@ func (l *maListener) Accept() (Conn, error) {
}
}
return
wrap
(
nconn
,
l
.
laddr
,
raddr
),
nil
var
laddr
ma
.
Multiaddr
if
nconn
.
LocalAddr
()
.
String
()
!=
""
{
laddr
,
err
=
FromNetAddr
(
nconn
.
LocalAddr
())
if
err
!=
nil
{
return
nil
,
fmt
.
Errorf
(
"failed to convert conn.LocalAddr: %s"
,
err
)
}
}
return
wrap
(
nconn
,
laddr
,
raddr
),
nil
}
// Multiaddr returns the listener's (local) Multiaddr.
...
...
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