while (!hupped) {
// Since we are non-blocking, we need to wait for the right state first.
// Wait up to 50 ms, then check hupped.
while (!hupped) {
// Since we are non-blocking, we need to wait for the right state first.
// Wait up to 50 ms, then check hupped.