DESCRIPTION

plug potential file descriptor leak

There is a problem in open/connect sequence that may produce file descriptor leaks in some abnormal conditions:
First, SocketChannel.open() is called, then ch.connect(a.getSocketAddress()) is called and it may throw an IOException under certain conditions.
Then we catch exception and re-queue the node. This will produce a leak since the channel was not closed.
	The problem surfaced because of some faulty changes that I made and which I fixed. But it's nevertheless a problem.
This is the Sun  bug reference. http://bugs.sun.com/view_bug.do?bug_id=6548464
They fixed it in a helper method that opens/connects in a single call. But in our case the client needs to take care of it.


COMMENTS

author: Allan Henderson
date: 2010-06-17 18:14:09.524000000

Patch Set 1: Abandoned

submitted another one

-------------------------------------
