We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 67053ce commit 0bca2aeCopy full SHA for 0bca2ae
1 file changed
packages/mitmproxy/src/lib/choice/index.js
@@ -116,13 +116,14 @@ class DynamicChoice {
116
117
// 计算成功率
118
count.successRate = 1.0 - (count.error / count.total)
119
+
120
+ // 判断是否需要切换下一个
121
if (isError && this.value === ip) {
- // 连续错误3次,切换下一个
122
if (count.keepErrorCount >= 3) {
123
+ // 连续错误3次,切换下一个
124
this.changeNext(count)
- }
- // 成功率小于40%,切换下一个
125
- if (count.successRate < 0.4) {
+ } else if (count.successRate < 0.4) {
126
+ // 成功率小于40%,切换下一个
127
128
}
129
0 commit comments