0
0
mirror of https://github.com/yse/easy_profiler.git synced 2024-12-26 08:01:51 +08:00

Merge pull request #152 from tkalbitz/patch-2

EasySocket::accept() waits 500ms instead 0.5ms till select timeout.
This commit is contained in:
Sergey Yagovtsev 2024-09-20 19:31:47 +03:00 committed by GitHub
commit 2f22059a40
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -325,7 +325,7 @@ int EasySocket::accept()
fd_set fdwrite = fdread;
fd_set fdexcl = fdread;
struct timeval tv { 0, 500 };
struct timeval tv { 0, 500000 };
const int rc = ::select((int)m_socket + 1, &fdread, &fdwrite, &fdexcl, &tv);
if (rc <= 0)
return -1; // there is no connection for accept