Skip to content

Commit

Permalink
Update conn.go (netsec-ethz#77)
Browse files Browse the repository at this point in the history
fix bug: get a bad ip string
  • Loading branch information
lichao2014 authored and lunny committed Jul 12, 2019
1 parent c46bdf8 commit 1149070
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion conn.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ func (conn *Conn) passiveListenIP() string {
if len(conn.PublicIp()) > 0 {
listenIP = conn.PublicIp()
} else {
listenIP = conn.conn.LocalAddr().String()
listenIP = conn.conn.LocalAddr().(*net.TCPAddr).IP.String()
}

lastIdx := strings.LastIndex(listenIP, ":")
Expand Down

0 comments on commit 1149070

Please sign in to comment.