This commit is contained in:
Zack Scholl 2019-11-19 16:01:16 -08:00
parent 99559e1b6d
commit ad60618cb6
1 changed files with 6 additions and 1 deletions

View File

@ -510,12 +510,17 @@ func (c *Client) CreateOfferer(finished chan<- error) (pc *webrtc.PeerConnection
}
err = box.Unbundle(string(dcMsg.Data), c.Key, &fd)
if err == nil {
lastSignal = time.Now()
n, _ := fwrite.Write(fd.Data)
bar.Add(n)
if time.Since(lastSignal).Seconds() > 1 {
sendData([]byte{2, 3, 4})
lastSignal = time.Now()
time.Sleep(1 * time.Second)
sendData([]byte{2, 3, 4})
time.Sleep(1 * time.Second)
sendData([]byte{2, 3, 4})
time.Sleep(1 * time.Second)
}
} else {
log.Error(err)