When trying to connect a tcp socket in a loop, the gen_tcp connect call sometimes gives {ok, P} even though no socket is actually listening on the port trying to connect to. This patch has been accepted by the OTP team but is not in the R12B-4 release. Reproducible: Sometimes Steps to Reproduce: See link to mailing list.
Created attachment 166854 [details] Patch for the inet driver
Created attachment 166855 [details] Tiny ebuild change to apply the inet patch
Thanks for the report, fixed and stabilisation of 12B-4 series postponed to November.