+ bool valid_result = false;
+
+#if !defined(wxUSE_GUI) || !wxUSE_GUI
+ // This is used to avoid a busy loop on wxBase - having a select
+ // timeout of 50 ms per iteration should be enough.
+ if (timeout > 50)
+ m_socket->SetTimeout(50);
+ else
+ m_socket->SetTimeout(timeout);
+#endif