tst_qeventloop: replace select with poll
Change-Id: Ib2b71696e24249b0b13bb925a7bb627ef09f2dff Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This commit is contained in:
parent
4bf741066d
commit
e9802a1073
@ -425,11 +425,8 @@ public slots:
|
||||
dataSent = serverSocket->waitForBytesWritten(-1);
|
||||
|
||||
if (dataSent) {
|
||||
fd_set fdread;
|
||||
int fd = socket->socketDescriptor();
|
||||
FD_ZERO(&fdread);
|
||||
FD_SET(fd, &fdread);
|
||||
dataReadable = (1 == qt_safe_select(fd + 1, &fdread, 0, 0, 0));
|
||||
pollfd pfd = qt_make_pollfd(socket->socketDescriptor(), POLLIN);
|
||||
dataReadable = (1 == qt_safe_poll(&pfd, 1, nullptr));
|
||||
}
|
||||
|
||||
if (!dataReadable) {
|
||||
|
Loading…
Reference in New Issue
Block a user