Skip to content

Commit

Permalink
Simplify
Browse files Browse the repository at this point in the history
  • Loading branch information
kou committed Apr 10, 2024
1 parent 173675c commit 19b7ab0
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions lib/groonga-query-log/server-verifier.rb
Original file line number Diff line number Diff line change
Expand Up @@ -198,13 +198,12 @@ def verify_command(groonga1_client, groonga2_client, command)
sleep_thread = nil
request = groonga2_client.execute(command) do |response|
response2 = response
sleep_thread.kill if sleep_thread
sleep_thread.kill
end

# Randomize timing of sending request_cancel command
sleep_thread = Thread.new do
sleep(rand(0..@options.cancel_max_wait))
sleep_thread = nil
end
sleep_thread.join
unless response2
Expand Down

0 comments on commit 19b7ab0

Please sign in to comment.