
Sept. 29, 2010
5:52 p.m.
On Wed, Sep 29, 2010 at 6:40 PM, ruslan usifov <ruslan.usifov@gmail.com> wrote:
If we stop listening, how can i wait while all client connection (which was accepted before stopListening) processed and then call reactor.stop?
In your factory, keep a count of the number of clients you have and whether stopListening has been called. In your protocol's connectionLost() method, decrease that count by one and check to see if it's zero. If it's zero, and stopListening has been called, call reactor.stop(). jml