Skip to content

Commit

Permalink
rst if exist only one group
Browse files Browse the repository at this point in the history
  • Loading branch information
ruti committed Sep 24, 2024
1 parent dca3b56 commit e406476
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions extend.c
Original file line number Diff line number Diff line change
Expand Up @@ -223,21 +223,24 @@ int on_torst(struct poolhd *pool, struct eval *val)
for (; m < params.dp_count; m++) {
struct desync_params *dp = &params.dp[m];
if (!dp->detect) {
return -1;
m = 0;
break;
}
if (dp->detect & DETECT_TORST) {
break;
}
}
if (m >= params.dp_count) {
if (m == 0) {
}
else if (m >= params.dp_count) {
if (m > 1) mode_add_get(
(struct sockaddr_ina *)&val->in6, 0);
}
else if (can_reconn)
else if (can_reconn) {
return reconnect(pool, val, m);
else
mode_add_get(
(struct sockaddr_ina *)&val->in6, m);
}
else mode_add_get(
(struct sockaddr_ina *)&val->in6, m);
}
struct linger l = { .l_onoff = 1 };
if (setsockopt(val->pair->fd, SOL_SOCKET,
Expand Down

0 comments on commit e406476

Please sign in to comment.