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
7274874c
Unverified
Commit
7274874c
authored
Jan 22, 2021
by
Aarsh Shah
Committed by
GitHub
Jan 22, 2021
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #135 from multiformats/feat/fix-local-addr
Fix Local Address on TCP connections
parents
d18c05e0
900a4d7e
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 @
7274874c
...
...
@@ -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