mirror of
https://github.com/wolfpld/tracy.git
synced 2024-11-23 06:44:35 +00:00
Infer socket readiness from select() return value.
This commit is contained in:
parent
807d2a02bc
commit
3799e0da43
@ -233,8 +233,7 @@ bool Socket::HasData()
|
||||
FD_ZERO( &fds );
|
||||
FD_SET( m_sock, &fds );
|
||||
|
||||
select( m_sock+1, &fds, nullptr, nullptr, &tv );
|
||||
return FD_ISSET( m_sock, &fds );
|
||||
return select( m_sock+1, &fds, nullptr, nullptr, &tv ) > 0;
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user