0
0
Fork 0
mirror of https://github.com/schollz/croc.git synced 2025-10-11 21:30:16 +02:00

show ping

This commit is contained in:
Zack Scholl 2020-10-22 10:13:41 -07:00
parent d3aa2be9ab
commit bf9ebfc4b4

View file

@ -544,6 +544,7 @@ func (c *Client) Receive() (err error) {
} }
address := net.JoinHostPort(discoveries[0].Address, portToUse) address := net.JoinHostPort(discoveries[0].Address, portToUse)
if tcp.PingServer(address) == nil { if tcp.PingServer(address) == nil {
log.Debugf("succesfully pinged '%s'", address)
c.Options.RelayAddress = address c.Options.RelayAddress = address
c.ExternalIPConnected = c.Options.RelayAddress c.ExternalIPConnected = c.Options.RelayAddress
c.Options.RelayAddress6 = "" c.Options.RelayAddress6 = ""