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

allow discovering self

This commit is contained in:
Zack Scholl 2018-09-24 06:49:26 -07:00
parent e6b9655387
commit 90b08abf39

View file

@ -44,7 +44,7 @@ func (c *Croc) Send(fname, codephrase string) (err error) {
// broadcast for peer discovery
go func() {
log.Debug("listening for local croc relay...")
log.Debug("starting local croc relay...")
go peerdiscovery.Discover(peerdiscovery.Settings{
Limit: 1,
TimeLimit: 600 * time.Second,
@ -81,6 +81,7 @@ func (c *Croc) Receive(codephrase string) (err error) {
TimeLimit: 300 * time.Millisecond,
Delay: 50 * time.Millisecond,
Payload: []byte("checking"),
AllowSelf: true,
})
if errDiscover != nil {
log.Debug(errDiscover)