mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-09 08:55:33 +00:00
ptp: On Windows handle socket polls that result in no error but also no FD_READ event
According to the documentation this should never happen but apparently does under certain circumstances. As the sockets are set non-blocking, trying to read from them regardless should not cause any problems. In all cases that were observed so far, the socket in question actually has a packet queued up for reading. Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4748>
This commit is contained in:
parent
a7b09098b9
commit
98c5ceb73f
1 changed files with 11 additions and 1 deletions
|
@ -696,7 +696,17 @@ mod imp {
|
||||||
if res == 0 { "event" } else { "general" },
|
if res == 0 { "event" } else { "general" },
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
assert!(networkevents.lnetworkevents & FD_READ != 0);
|
|
||||||
|
// FIXME: This seems to happen every now and then although it shouldn't, and in
|
||||||
|
// that case a packet always seems to be queued up on the socket. As the sockets
|
||||||
|
// are non-blocking it also wouldn't be a problem otherwise, so let's just log this
|
||||||
|
// here and ignore it.
|
||||||
|
if networkevents.lnetworkevents & FD_READ == 0 {
|
||||||
|
debug!(
|
||||||
|
"Socket {} woke up but has neither an error nor a FD_READ event",
|
||||||
|
res
|
||||||
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Ok(PollResult {
|
Ok(PollResult {
|
||||||
|
|
Loading…
Reference in a new issue