Restart connection on proper exception type.