QAbstractSocket:waitForReadyRead(): fix handling UDP

Allow sockets in bound state to wait for notifications.

Task-number: QTBUG-52449
Change-Id: I5c02bd61db68abca652312d4d59023963b05b3c5
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@theqtcompany.com>
This commit is contained in:
Alex Trotsenko 2016-04-08 10:46:36 +03:00 committed by Timur Pocheptsov
parent c511466d74
commit 21b3e2265a

View File

@ -2150,7 +2150,7 @@ bool QAbstractSocket::waitForReadyRead(int msecs)
}
do {
if (state() != ConnectedState)
if (state() != ConnectedState && state() != BoundState)
return false;
bool readyToRead = false;