Merge branch 'sock-event-fix'
Fix unwanted (and sometimes fatal) socket events for blocking sockets under Unix. See https://github.com/wxWidgets/wxWidgets/pull/1658
This commit is contained in:
@@ -57,10 +57,7 @@ public:
|
||||
// anything here
|
||||
}
|
||||
|
||||
private:
|
||||
virtual void DoClose() wxOVERRIDE;
|
||||
|
||||
virtual void UnblockAndRegisterWithEventLoop() wxOVERRIDE
|
||||
virtual void UpdateBlockingState() wxOVERRIDE
|
||||
{
|
||||
if ( GetSocketFlags() & wxSOCKET_BLOCK )
|
||||
{
|
||||
@@ -74,6 +71,9 @@ private:
|
||||
// would result in data races and other unpleasantness.
|
||||
wxIoctlSocketArg_t trueArg = 1;
|
||||
ioctlsocket(m_fd, FIONBIO, &trueArg);
|
||||
|
||||
// Uninstall it in case it was installed before.
|
||||
wxSocketManager::Get()->Uninstall_Callback(this);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -83,6 +83,9 @@ private:
|
||||
}
|
||||
}
|
||||
|
||||
private:
|
||||
virtual void DoClose() wxOVERRIDE;
|
||||
|
||||
int m_msgnumber;
|
||||
|
||||
friend class wxSocketMSWManager;
|
||||
|
||||
Reference in New Issue
Block a user