Socket leak in Apache Harmony SocketImpl on Android?
<p>I have been working with dnsjava to do a lot of DNS lookups, using the Lookup class with its own resolver per lookup, and also with a single shared resolver. No matter how I invoke it, there are always collections of sockets left open at the end of the process, and eventually my process runs out of file descriptors and is killed.</p>

<p>Tracing the code, I found that creating a Selector object causes two additional sockets to be created, and these are the two that are never closed. The dnsjava code is calling the Selector's close() method (I have stepped over that and verified that the two sockets, sink and source, are left open after it).</p>

<p>Has anybody else seen this? Is there some way I can force those sockets to close? I don't see any public API to get the source and sink socket references from the Selector class, but perhaps I am missing something?</p>
