Re: [Boost-users] Boost-users Digest, Vol 3349, Issue 1

Hi Igor, Am 04.02.2013 um 14:15 schrieb boost-users-request@lists.boost.org:
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. kind regards Torsten

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.
participants (2)
-
Igor R
-
Torsten@Robitzki.de