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:
parent
e6b9655387
commit
90b08abf39
1 changed files with 2 additions and 1 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue