QNativeSocketEngine: React on POLLHUP too when selecting for writing
FreeBSD may return a single POLLHUP revent not coupled with any of POLLOUT nor POLLERR. This causes a busy-loop, so put POLLHUP into write_flags. Change-Id: Ief62138eeb6de8e2caf1d6937507bfd828adfb81 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This commit is contained in:
parent
4ba106b38f
commit
59c29436db
@ -1380,7 +1380,7 @@ int QNativeSocketEnginePrivate::nativeSelect(QDeadlineTimer deadline, bool check
|
||||
}
|
||||
|
||||
static const short read_flags = POLLIN | POLLHUP | POLLERR;
|
||||
static const short write_flags = POLLOUT | POLLERR;
|
||||
static const short write_flags = POLLOUT | POLLHUP | POLLERR;
|
||||
|
||||
*selectForRead = ((pfd.revents & read_flags) != 0);
|
||||
*selectForWrite = ((pfd.revents & write_flags) != 0);
|
||||
|
Loading…
x
Reference in New Issue
Block a user