impl/tcpsocket: Don't try to listen() if not connected

This commit is contained in:
Perttu Ahola 2014-10-31 11:33:46 +02:00
parent 3cb57eaee4
commit bd32beff5e

View File

@ -288,6 +288,9 @@ struct CTCPSocket: public TCPSocket
}
bool wait_data(int timeout_us)
{
if(m_fd == -1)
return false;
struct timeval tv;
tv.tv_sec = 0;
tv.tv_usec = timeout_us;