Boost logo

Boost Users :

Subject: Re: [Boost-users] socket.is_open returning false when it is in use
From: Juan Ramírez (juanantonio.ram_at_[hidden])
Date: 2012-12-26 09:00:58


What about the function client_thread() ?

The ioservice has no worker attached to it: I think the run() function is
returning earlier because of that, and then the client is destroyed
(closing the socket on its way)?

Can you try to put some log at the beginning and at the end of the function?

__________
Saludos!
     Juan

On Mon, Dec 24, 2012 at 11:09 PM, Gonzalo Garramuno <ggarra13_at_[hidden]>wrote:

> On 09/12/12 11:55, Igor R wrote:
>
>> I did both things. The destructor never gets called. The native socket
>>> changes from 24 to -1 (which I guess it means it is also wrong).
>>>
>> -1 means "invalid descriptor", and this is actually the point where
>> is_open() would return false. But did you spot the moment where it
>> changes to -1?
>>
> I cannot find what changes it to -1. I put some print statements in boost
> asio, and I got the following log, which is very strange.
> The following line appears twice at the beginning when it should appear
> once, I think.
>
> 0x7f1f180010f8 >>>>>>>>>>>> construct socket is now invalid -1
>
>
>
>
> _______________________________________________
> Boost-users mailing list
> Boost-users_at_[hidden]
> http://lists.boost.org/mailman/listinfo.cgi/boost-users
>



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