Merge pull request #1975 from UrBnW/udping

fix division by 0
This commit is contained in:
qgarnier 2020-04-30 15:07:05 +02:00 committed by GitHub
commit 7aea1c8427
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -127,7 +127,7 @@ sub manage_selection {
}
$self->{global} = {
rta => $total_time_elapsed * 1000 / ($self->{option_packets} - $total_packet_lost),
rta => ($self->{option_packets} > $total_packet_lost) ? $total_time_elapsed * 1000 / ($self->{option_packets} - $total_packet_lost) : 0,
rtmax => $max_time_elapsed * 1000,
rtmin => $min_time_elapsed * 1000,
pl => int($total_packet_lost * 100 / $self->{option_packets}),