Skip to content

Commit

Permalink
Merge pull request #4 from silverfin/guillaume-make-boot-great-again
Browse files Browse the repository at this point in the history
Make the boot service great again
  • Loading branch information
voxdei authored Sep 15, 2023
2 parents 6319dc9 + 5082697 commit 90e187f
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/win32/daemon.rb
Original file line number Diff line number Diff line change
Expand Up @@ -269,6 +269,10 @@ def mainloop
events.put_pointer(FFI::Pointer.size, FFI::Pointer.new(@@hStartEvent))

while (index = WaitForMultipleObjects(2, events, 0, 1000)) == WAIT_TIMEOUT
# applying some magic to delay things, as somehow this while loop
# can enter some kind of deadlock state without this, leading
# to our service not being able to boot
sleep(0.1)
end

if index == WAIT_FAILED
Expand Down

0 comments on commit 90e187f

Please sign in to comment.