Allow disabling events for blocking sockets in Unix version
It should still be possible to use DoEnableEvents() to disable events
for blocking sockets and this can be useful if a previously non-blocking
socket became blocking due to a SetFlags(wxSOCKET_BLOCK) call, so adjust
the fix of e18c8fd29a
(see #17031) to
avoid calling EnableEvents() for blocking sockets instead of ignoring
them in DoEnableEvents() itself.
Also add an assert checking that we never try enabling events for
blocking sockets as this still doesn't make sense and so shouldn't
happen.
No real changes yet, but this is necessary for the upcoming commits.
See #12886.
This commit is contained in:
@@ -40,6 +40,10 @@ public:
|
||||
|
||||
virtual void ReenableEvents(wxSocketEventFlags flags) wxOVERRIDE
|
||||
{
|
||||
// Events are only ever used for non-blocking sockets.
|
||||
if ( GetSocketFlags() & wxSOCKET_BLOCK )
|
||||
return;
|
||||
|
||||
// enable the notifications about input/output being available again in
|
||||
// case they were disabled by OnRead/WriteWaiting()
|
||||
//
|
||||
|
Reference in New Issue
Block a user