Sounds nice but it never reaches finalize. I am listening to a tcp socket. Right now, after your answer, I call finalize when I receive an error on the socket. In finalize I decrease the activeConnections variable. It seems to work ok but it bothers me that it never reaches finalize by itself.
Thanks / Henrik