1
0
mirror of https://github.com/schollz/croc.git synced 2024-11-28 09:35:14 +03:00

disable broadcast

This commit is contained in:
Zack Scholl 2018-09-24 07:24:59 -07:00
parent e10789b558
commit b14f1c35a3

View File

@ -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)