4 Feb
2013
4 Feb
'13
2:02 p.m.
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.