mirror of https://github.com/schollz/croc.git
skip discovery
This commit is contained in:
parent
da626334e0
commit
c7624535e9
|
@ -395,8 +395,10 @@ func (c *Client) Receive() (err error) {
|
||||||
})
|
})
|
||||||
if err == nil && len(discoveries) > 0 {
|
if err == nil && len(discoveries) > 0 {
|
||||||
for i := 0; i < len(discoveries); i++ {
|
for i := 0; i < len(discoveries); i++ {
|
||||||
|
log.Debugf("discovery %d has payload: %+v", i, discoveries[i])
|
||||||
if !bytes.HasPrefix(discoveries[i].Payload, []byte("croc")) {
|
if !bytes.HasPrefix(discoveries[i].Payload, []byte("croc")) {
|
||||||
log.Debugf("discovery %d has wrong payload: %+v", i, discoveries[i])
|
log.Debug("skipping discovery")
|
||||||
|
continue
|
||||||
}
|
}
|
||||||
log.Debug("switching to local")
|
log.Debug("switching to local")
|
||||||
c.Options.RelayAddress = fmt.Sprintf("%s:%s",
|
c.Options.RelayAddress = fmt.Sprintf("%s:%s",
|
||||||
|
|
Loading…
Reference in New Issue