mirror of
https://github.com/schollz/croc.git
synced 2025-10-11 13:21:00 +02:00
fix broadcast
This commit is contained in:
parent
3c22789e3b
commit
67bceee220
1 changed files with 11 additions and 14 deletions
25
connect.go
25
connect.go
|
@ -229,20 +229,17 @@ func (c *Connection) Run() error {
|
|||
}
|
||||
|
||||
// broadcast local connection from sender
|
||||
if c.Server == "" {
|
||||
log.Debug("settings payload to ", c.Code)
|
||||
go func() {
|
||||
log.Debug("listening for local croc relay...")
|
||||
go peerdiscovery.Discover(peerdiscovery.Settings{
|
||||
Limit: 1,
|
||||
TimeLimit: 600 * time.Second,
|
||||
Delay: 50 * time.Millisecond,
|
||||
Payload: []byte(c.Code),
|
||||
})
|
||||
runClientError <- c.runClient("localhost")
|
||||
}()
|
||||
|
||||
}
|
||||
log.Debug("settings payload to ", c.Code)
|
||||
go func() {
|
||||
log.Debug("listening for local croc relay...")
|
||||
go peerdiscovery.Discover(peerdiscovery.Settings{
|
||||
Limit: 1,
|
||||
TimeLimit: 600 * time.Second,
|
||||
Delay: 50 * time.Millisecond,
|
||||
Payload: []byte(c.Code),
|
||||
})
|
||||
runClientError <- c.runClient("localhost")
|
||||
}()
|
||||
}
|
||||
|
||||
log.Debug("checking code validity")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue