The previous logic assumed that a datagram must be available if the future was notified, but this might not be the case if e.g. two futures are concurrently waiting for datagrams, but only one datagram has been received, since we use notify_waiters to wake all waiting futures to be robust in the face of cancellation.
The previous logic assumed that a datagram must be available if the future was notified, but this might not be the case if e.g. two futures are concurrently waiting for datagrams, but only one datagram has been received, since we use notify_waiters to wake all waiting futures to be robust in the face of cancellation.
Fixes #1454.