From 8e677537c0ea90e73e3209ef1dc817a1e28ada8d Mon Sep 17 00:00:00 2001 From: Joe Bryan Date: Thu, 15 Dec 2022 14:10:22 -0500 Subject: [PATCH] mars: fix bail:meme retry counter --- pkg/urbit/worker/mars.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/pkg/urbit/worker/mars.c b/pkg/urbit/worker/mars.c index 43b4a4814..9a3e59ab8 100644 --- a/pkg/urbit/worker/mars.c +++ b/pkg/urbit/worker/mars.c @@ -203,7 +203,6 @@ u3_mars_play(u3_mars* mar_u, c3_d eve_d) } { - c3_d fir_d = mar_u->dun_d; // started at c3_d mem_d = 0; // last event to meme c3_w try_w = 0; // [mem_d] retry count @@ -222,7 +221,11 @@ u3_mars_play(u3_mars* mar_u, c3_d eve_d) } break; case _play_mem_e: { - if ( (mem_d == mar_u->dun_d) && (3 == ++try_w) ) { + if ( mem_d != mar_u->dun_d ) { + mem_d = mar_u->dun_d; + try_w = 0; + } + else if ( 3 == ++try_w ) { fprintf(stderr, "play (%" PRIu64 "): failed\r\n", mar_u->dun_d + 1); u3m_save(); // XX check loom size, suggest --loom X @@ -231,8 +234,6 @@ u3_mars_play(u3_mars* mar_u, c3_d eve_d) exit(1); } - mem_d = mar_u->dun_d; - // XX pack before meld? // if ( u3C.wag_w & u3o_auto_meld ) {