0
0
mirror of https://github.com/yse/easy_profiler.git synced 2024-12-27 00:31:02 +08:00

EasySocket::accept() waits 500ms instead 0.5ms till select timeout.

This commit is contained in:
Tobias Kalbitz 2019-03-09 21:39:13 +01:00 committed by GitHub
parent e68abb25fe
commit de24ee4eca
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -320,7 +320,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