Boost logo

Boost Users :

Subject: Re: [Boost-users] Boost-users Digest, Vol 3349, Issue 1
From: Igor R (boost.lists_at_[hidden])
Date: 2013-02-04 09:02:55


>> Send Boost-users mailing list submit
>
>>>
>>> s.close(); // first time to cancel outstanding handlers
>>> s.close(); // a second time, later in the d'tor
>
>>> But what does 'Bad file descriptor' mean in this context? Is the underlying socket is somehow broken/corrupted? If so, there must be
>>> a bug in my code. If not, is it save to simply ignore the error?
>>
>>
>> It means that tcp::socket is closed (and the underlying native
>> descriptor is something like -1).
>
> do you think there is something wrong with closing the socket a second time? The documentation doesn't states any precondition.

It depends on your definition of "wrong". It won't crash or corrupt
anything, but it might point to some issue in your applicatin design.


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net