Close the the updater's shared HttpUrlConnection socket if an exception occurs.
When Onionoo's updater uses a HttpUrlConnection it doesn't attempt to close the socket after an exception. An exception may occur anytime during or after the first fetchRemoteDirectory of DescriptorSource. The problem is this can leave the HttpUrlConnection's shared underlying network connection in a state which blocks further requests. This has the effect of preventing reads as early as during the first fetchRemoteFiles. Onionoo's updater will then block until the problem HttpUrlConnection is handled.
To reproduce. Close the connection remotely during fetchRemoteDirectory.
Trac:
Username: leeroy