Skip to content

Commit

Permalink
Merge pull request #262 from film42/gt/mri_thread_bug
Browse files Browse the repository at this point in the history
Thread can be sleeping under MRI, fix by using `alive?`
  • Loading branch information
abrandoned committed Jul 2, 2015
2 parents bc20ab3 + a5b69ce commit ac3ddf3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/protobuf/rpc/servers/zmq/server.rb
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,7 @@ def init_zmq_context
end

def start_broker
return if @broker && @broker.running? && !@broker_thread.stop?
return if @broker && @broker.running? && @broker_thread.alive?
if @broker && !@broker.running?
broadcast_flatline if broadcast_busy?
@broker_thread.join if @broker_thread
Expand Down

0 comments on commit ac3ddf3

Please sign in to comment.