diff --git a/src/unix/gsocket.cpp b/src/unix/gsocket.cpp index 8e48f63cdf..ac1610a0b8 100644 --- a/src/unix/gsocket.cpp +++ b/src/unix/gsocket.cpp @@ -966,6 +966,9 @@ GSocketEventFlags GSocket::Select(GSocketEventFlags flags) assert(this); + if (m_fd == -1) + return (GSOCK_LOST_FLAG & flags); + /* Do not use a static struct, Linux can garble it */ tv.tv_sec = m_timeout / 1000; tv.tv_usec = (m_timeout % 1000) * 1000;