corrected assert in wxSocket::Initialize()
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@28482 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -122,14 +122,6 @@ bool wxSocketBase::Initialize()
|
|||||||
{
|
{
|
||||||
if ( !m_countInit++ )
|
if ( !m_countInit++ )
|
||||||
{
|
{
|
||||||
#ifdef __WXMSW__
|
|
||||||
/*
|
|
||||||
The following asserting might be neccessary for linux as well,
|
|
||||||
but I cannot verify this.
|
|
||||||
*/
|
|
||||||
wxASSERT(wxThread::IsMain(),
|
|
||||||
wxT("To use sockets in a secondary thread, ")
|
|
||||||
wxT("call wxSocketBase::Initialize() from the main thread."));
|
|
||||||
/*
|
/*
|
||||||
Details: Initialize() creates a hidden window as a sink for socket
|
Details: Initialize() creates a hidden window as a sink for socket
|
||||||
events, such as 'read completed'. wxMSW has only one message loop
|
events, such as 'read completed'. wxMSW has only one message loop
|
||||||
@@ -141,7 +133,9 @@ bool wxSocketBase::Initialize()
|
|||||||
on a semaphore (a bad idea in any case) or socket operations
|
on a semaphore (a bad idea in any case) or socket operations
|
||||||
will time out.
|
will time out.
|
||||||
*/
|
*/
|
||||||
#endif
|
wxASSERT_MSG( wxThread::IsMain(),
|
||||||
|
wxT("Call wxSocketBase::Initialize() from the main thread first!"));
|
||||||
|
|
||||||
wxAppTraits *traits = wxAppConsole::GetInstance() ?
|
wxAppTraits *traits = wxAppConsole::GetInstance() ?
|
||||||
wxAppConsole::GetInstance()->GetTraits() : NULL;
|
wxAppConsole::GetInstance()->GetTraits() : NULL;
|
||||||
GSocketGUIFunctionsTable *functions =
|
GSocketGUIFunctionsTable *functions =
|
||||||
|
Reference in New Issue
Block a user