diff options
Diffstat (limited to 'ace/Handle_Set.i')
-rw-r--r-- | ace/Handle_Set.i | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/ace/Handle_Set.i b/ace/Handle_Set.i index ac7e837c2d9..ce845d95279 100644 --- a/ace/Handle_Set.i +++ b/ace/Handle_Set.i @@ -84,7 +84,8 @@ ACE_INLINE void ACE_Handle_Set::set_bit (ACE_HANDLE handle) { ACE_TRACE ("ACE_Handle_Set::set_bit"); - if (!this->is_set (handle)) + if ((handle != ACE_INVALID_HANDLE) + && (!this->is_set (handle))) { #if defined (ACE_WIN32) FD_SET ((SOCKET) handle, @@ -116,7 +117,8 @@ ACE_Handle_Set::clr_bit (ACE_HANDLE handle) { ACE_TRACE ("ACE_Handle_Set::clr_bit"); - if (this->is_set (handle)) + if ((handle != ACE_INVALID_HANDLE) && + (this->is_set (handle))) { FD_CLR ((ACE_SOCKET) handle, &this->mask_); |