drtio: add ping timeout during link init

This commit is contained in:
Sebastien Bourdeauducq 2018-07-26 20:27:53 +08:00
parent 446f791180
commit 83de8b2ba2
1 changed files with 3 additions and 0 deletions

View File

@ -101,6 +101,9 @@ pub mod drtio {
return 0
}
count += 1;
if count > 200 {
return 0;
}
drtioaux::send_link(linkno, &drtioaux::Packet::EchoRequest).unwrap();
io.sleep(100).unwrap();
let pr = drtioaux::recv_link(linkno);