From b14f1c35a328321955d829cc19364897910e370f Mon Sep 17 00:00:00 2001 From: Zack Scholl Date: Mon, 24 Sep 2018 07:24:59 -0700 Subject: [PATCH] disable broadcast --- src/croc/sending.go | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/croc/sending.go b/src/croc/sending.go index 739247b..78b423f 100644 --- a/src/croc/sending.go +++ b/src/croc/sending.go @@ -78,11 +78,12 @@ func (c *Croc) Receive(codephrase string) (err error) { if !c.NoLocal { // try to discovery codephrase and server through peer network discovered, errDiscover := peerdiscovery.Discover(peerdiscovery.Settings{ - Limit: 1, - TimeLimit: 300 * time.Millisecond, - Delay: 50 * time.Millisecond, - Payload: []byte("checking"), - AllowSelf: true, + Limit: 1, + TimeLimit: 300 * time.Millisecond, + Delay: 50 * time.Millisecond, + Payload: []byte("checking"), + AllowSelf: true, + DisableBroadcast: true, }) if errDiscover != nil { log.Debug(errDiscover)