Update: I've solved it :D I had to do this workaround:
new Thread(new ConnectorDisposer(connector, future), "ConnectorDisposer").start(); The run() method on ConnectorDisposer class do: future.awaitUninterruptibly(5, TimeUnit.SECONDS); connector.dispose(); And there is no more file descriptors leaks :) Hopes it helps someone else. On Fri, Jan 15, 2010 at 2:57 PM, Leandro Casadei <[email protected]> wrote: > On Fri, Jan 15, 2010 at 2:54 PM, Emmanuel Lécharny > <[email protected]>wrote: >> >> >> Where in your code is the disconnect() method called ? > > > It's called somewhere else. The same place where connect() is called. > The code i've posted is a piece of a client application that is used by > another application. > > -- > Leandro Casadei > QB9 Programmer > www.qb9.net > -- Leandro Casadei QB9 Programmer www.qb9.net
