aboutsummaryrefslogtreecommitdiffstats
path: root/libtransport/src/utils/epoll_event_reactor.cc
diff options
context:
space:
mode:
Diffstat (limited to 'libtransport/src/utils/epoll_event_reactor.cc')
-rw-r--r--libtransport/src/utils/epoll_event_reactor.cc12
1 files changed, 7 insertions, 5 deletions
diff --git a/libtransport/src/utils/epoll_event_reactor.cc b/libtransport/src/utils/epoll_event_reactor.cc
index 0e6590d0e..eb8c65352 100644
--- a/libtransport/src/utils/epoll_event_reactor.cc
+++ b/libtransport/src/utils/epoll_event_reactor.cc
@@ -14,12 +14,11 @@
*/
#include <hicn/transport/utils/branch_prediction.h>
-
+#include <signal.h>
+#include <unistd.h>
#include <utils/epoll_event_reactor.h>
#include <utils/fd_deadline_timer.h>
-#include <signal.h>
-#include <unistd.h>
#include <iostream>
namespace utils {
@@ -104,12 +103,15 @@ void EpollEventReactor::runEventLoop(int timeout) {
while (run_event_loop_) {
memset(&evt, 0, sizeof(evt));
-
en = epoll_pwait(epoll_fd_, evt, 128, timeout, &sigset);
if (TRANSPORT_EXPECT_FALSE(en < 0)) {
TRANSPORT_LOGE("epoll_pwait: %s", strerror(errno));
- return;
+ if (errno == EINTR) {
+ continue;
+ } else {
+ return;
+ }
}
for (int i = 0; i < en; i++) {