@JonB you might be right.
in fact I could see that if there is pending datagram, read it, and then again, and as well process after each if statement. Ok. I understand it now.
Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.