Skip to content

Commit 226dede

Browse files
committed
Fix linux
1 parent 62e3d35 commit 226dede

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

modules/yup_core/native/yup_Watchdog_linux.h

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -162,12 +162,16 @@ class Watchdog::Impl final
162162
FD_SET (fd, &fileDescriptorSet);
163163
if (select (FD_SETSIZE, &fileDescriptorSet, nullptr, nullptr, nullptr) <= 0)
164164
{
165+
if (threadShouldExit)
166+
break;
167+
165168
std::this_thread::sleep_for (std::chrono::milliseconds (50));
166169
continue;
167170
}
168-
169-
if (threadShouldExit)
171+
else if (threadShouldExit)
172+
{
170173
break;
174+
}
171175

172176
const ssize_t numRead = read (fd, buffer.data(), bufferSize);
173177

0 commit comments

Comments
 (0)