Boost logo

Boost Users :

Subject: Re: [Boost-users] Problem finally found!
From: Gonzalo Garramuno (ggarra13_at_[hidden])
Date: 2013-01-06 17:52:59


On 05/01/13 23:55, Juan Ramírez wrote:
> It's fine to call start_accept() inside the handle_accept() function,
> if you don't do it your server will not be able to accept another client
>
> You should check if the ioservice has enough threads to handle more
> than one client, maybe you have a single thread being blocked by the
> call to session->start(), if this is the case, your server cannot
> accept another client until the thread is released (make sure the
> ioservice has an oioservice::work object attached, btw).
>
> __________
> Saludos!
> Juan

Thanks, Juan for the help. I realized that the problem was my code was
storing a pointer to the session globally and when two sessions were
started, there would be an overlap. My quick fix of start_accept was
indeed making the server not take another client. I have a better fix
now, but I will need to work on the code much more to make it solid.



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