Re-try socket connection on failure.