Browse Source

We need to lock back

To avoid unlocked stat when we actually need to lock
Leo 9 years ago
parent
commit
bd712c97c7
1 changed files with 3 additions and 1 deletions
  1. 3 1
      src/lock.ml

+ 3 - 1
src/lock.ml

@@ -91,7 +91,9 @@ let wait ?(until=10) ?(delay=1) () =
     |> (function
     |> (function
        None ->
        None ->
          Messages.warning "Removing lock file, ran out of patience";
          Messages.warning "Removing lock file, ran out of patience";
-         remove ()
+         remove ();
+         (* We need to lock back, since it's the purpose of this function *)
+         lock ()
        | _ -> ()
        | _ -> ()
     )
     )
 ;;
 ;;