Skip to content

Commit

Permalink
Revert "reduce idle CPU consumption by the stream listener"
Browse files Browse the repository at this point in the history
This reverts commit 1d6c8f3.
  • Loading branch information
t-horikawa committed Feb 26, 2024
1 parent 3a7a7d1 commit 11c9db2
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/tateyama/endpoint/stream/stream.h
Original file line number Diff line number Diff line change
Expand Up @@ -397,11 +397,10 @@ class connection_socket
std::shared_ptr<stream_socket> accept(const std::function<void(void)>& cleanup = [](){} ) {
cleanup();

struct timeval tv{};
tv.tv_sec = 1; // 1(S)
tv.tv_usec = 0;
while (true) {
struct timeval tv{};
tv.tv_sec = 1; // 1(S)
tv.tv_usec = 0;

FD_ZERO(&fds_); // NOLINT
if (is_socket_available()) {
FD_SET(socket_, &fds_); // NOLINT
Expand Down

0 comments on commit 11c9db2

Please sign in to comment.