Skip to content

Commit 2b9c746

Browse files
committed
Fix: avoid double decrement of transmission queue
1 parent 5215632 commit 2b9c746

2 files changed

Lines changed: 3 additions & 4 deletions

File tree

src/commands/run/command.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -246,9 +246,8 @@ async fn task_main(
246246
&& let Some(desc) = upload_desc
247247
{
248248
let response = uploader.upload_and_fetch_best_known(desc).await;
249-
let score = score.unwrap();
250249

251-
if let Some(best_known) = response {
250+
if let Some(best_known) = response && let Some(score) = score {
252251
if best_known > score {
253252
context.display.stride_new_best_known();
254253
} else if best_known == score {

src/commands/run/display.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,7 @@ impl ProgressDisplay {
129129
format_num!(num_valid, "Valid", green),
130130
format_num!(num_emptysolution, "Empty ", yellow),
131131
format_num!(num_infeasible, "Infeas", yellow, CRITICAL),
132+
format_num!(num_timeout, "Timeout", yellow),
132133
format_num!(num_syntaxerror, "SyntErr", red),
133134
format_num!(num_solvererror, "SolvErr ", red),
134135
format_num!(num_systemerror, "SysErr", red),
@@ -148,7 +149,7 @@ impl ProgressDisplay {
148149
format_num!(num_stride_new_best_known, "New Best", yellow),
149150
format_num!(num_stride_suboptimal, "Subopt", red, CRITICAL),
150151
format_num!(num_stride_no_response, "No Resp", yellow),
151-
format_num!(num_stride_queued, "Transmit", green),
152+
format_num!(num_stride_queued, "Transmit Queue ", green),
152153
format_num!(num_stride_instances, "STRIDE Instances", white),
153154
];
154155

@@ -213,7 +214,6 @@ impl ProgressDisplay {
213214
}
214215

215216
pub fn stride_new_best_known(&self) {
216-
self.num_stride_queued.fetch_sub(1, Ordering::AcqRel);
217217
self.num_stride_new_best_known
218218
.fetch_add(1, Ordering::AcqRel);
219219
self.stride_inc_best_known();

0 commit comments

Comments
 (0)