summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--server/main_channel.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/server/main_channel.c b/server/main_channel.c
index bbe96c9..12009f3 100644
--- a/server/main_channel.c
+++ b/server/main_channel.c
@@ -961,11 +961,12 @@ static int main_channel_handle_parsed(RedChannelClient *rcc, uint32_t size, uint
case NET_TEST_STAGE_WARMUP:
mcc->net_test_id++;
mcc->net_test_stage = NET_TEST_STAGE_LATENCY;
+ mcc->latency = roundtrip;
break;
case NET_TEST_STAGE_LATENCY:
mcc->net_test_id++;
mcc->net_test_stage = NET_TEST_STAGE_RATE;
- mcc->latency = roundtrip;
+ mcc->latency = MIN(mcc->latency, roundtrip);
break;
case NET_TEST_STAGE_RATE:
mcc->net_test_id = 0;