Browse Source

Return fake IP even when there is no conn

pull/1520/head
Alexander Simmerl 7 years ago
parent
commit
20e9dd0737
No known key found for this signature in database GPG Key ID: 4694E95C9CC61BDA
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      p2p/peer.go

+ 1
- 1
p2p/peer.go View File

@ -56,7 +56,7 @@ func (pc peerConn) RemoteIP() net.IP {
return pc.ips[0]
}
if pc.conn.RemoteAddr().String() == "pipe" {
if pc.conn == nil || pc.conn.RemoteAddr().String() == "pipe" {
pc.ips = []net.IP{
net.IP{172, 16, 0, byte(atomic.AddUint32(&testIPSuffix, 1))},
}


Loading…
Cancel
Save