Skip to content

Commit 89a95ae

Browse files
committed
Made start() idempotent (returns Ok if already running instead of error)
1 parent 099dd42 commit 89a95ae

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

src/lib.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,8 @@ impl Node {
225225
// Acquire a run lock and hold it until we're setup.
226226
let mut is_running_lock = self.is_running.write().unwrap();
227227
if *is_running_lock {
228-
return Err(Error::AlreadyRunning);
228+
// Already running, return success (idempotent)
229+
return Ok(());
229230
}
230231

231232
log_info!(

0 commit comments

Comments
 (0)