Memory leaks, reopen socket during failure.