Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我找不到一种方法来以可靠的方式区分 ConnectExceptions 的不同原因(即除了检查消息字符串之外的其他方法)。我对检测由 ECONNREFUSED 引起的 ConnectException 作为重试逻辑的终止条件特别感兴趣。