Here is a proposed patch. There are a few considerations here that merit review.
First, is it safe to register sockets with a selector after the connect call? I assert yes because select is level based rather than transition based.
Secondly, is it safe to not register sockets that connect immediately? I think, but am not sure, that the answer is yes because we have clearly already called primeConnection().
Thirdly, is it OK to not rethrow the io exception from the connect call? I am not sure here. The immediate effect is that connection is only attempted at the timeout rate rather than the faster rate specified by some of the delays in the code. This seems OK at first glance, but other opinions would be nice to have.