log ice state

This commit is contained in:
Zack Scholl 2019-11-13 09:13:48 -08:00
parent af173327b8
commit 41a245d609
1 changed files with 6 additions and 5 deletions

View File

@ -396,6 +396,12 @@ func (c *Client) CreateOfferer(finished chan<- error) (pc *webrtc.PeerConnection
panic(errOpen)
}
fstat, _ := f.Stat()
msgSize, _ := box.Bundle(fstat.Size(), c.Key)
sendData([]byte(msgSize))
if pos == 0 {
log.Debug("transfering file")
}
timeStart := time.Now()
for {
for {
@ -404,11 +410,6 @@ func (c *Client) CreateOfferer(finished chan<- error) (pc *webrtc.PeerConnection
break
}
}
msg, _ := box.Bundle(fstat.Size(), c.Key)
sendData([]byte(msg))
if pos == 0 {
log.Debug("transfering file")
}
data := make([]byte, maxPacketSizeHalf)
n, errRead := f.Read(data)
if errRead != nil {