hci: add check for poll buffer overflow
Signed-off-by: deadprogram <ron@hybridgroup.com>
This commit is contained in:
parent
bf647ecd57
commit
e8c6a28223
1 changed files with 6 additions and 0 deletions
|
@ -185,6 +185,12 @@ func (h *hci) poll() error {
|
|||
return err
|
||||
case done:
|
||||
return nil
|
||||
case i+1 >= len(h.buf):
|
||||
if debug {
|
||||
println("hci error: buffer overflow")
|
||||
}
|
||||
i = 0
|
||||
time.Sleep(5 * time.Millisecond)
|
||||
default:
|
||||
i++
|
||||
time.Sleep(1 * time.Millisecond)
|
||||
|
|
Loading…
Reference in a new issue