Skip to content

Commit 35dc0ab

Browse files
committed
Daemon - only update thread if process is running
1 parent baa0235 commit 35dc0ab

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

app/server/ruby/bin/daemon.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -924,7 +924,7 @@ def initialize(ports, kill_switch, token)
924924
@pid_requester = SonicPi::OSC::UDPClient.new('localhost', ports["tau"])
925925

926926
@pid_updater_thread = Thread.new do
927-
while !@tau_pid.delivered?
927+
while !@tau_pid.delivered? && process_running?
928928
Util.log "Requesting tau send us its pid. Sending /send-pid-to-daemon"
929929
begin
930930
@pid_requester.send("/send-pid-to-daemon", token)

0 commit comments

Comments
 (0)