Avoid epoll_wait causing the lock to not be released (#3983)

* Avoid epoll_wait causing the lock to not be released.

* code style
This commit is contained in:
xiao 2023-03-28 04:48:54 +08:00 committed by GitHub
parent bcae06f423
commit 39a207ce62
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -169,7 +169,6 @@ public:
Poco::Timespan remainingTime(timeout);
int rc;
ScopedLock lock(_mutex);
do
{
Poco::Timestamp start;
@ -199,6 +198,8 @@ public:
}
while (false);
ScopedLock lock(_mutex);
for (int i = 0; i < rc; i++)
{
if (_events[i].data.ptr) // skip eventfd