[Groonga-commit] groonga/grntest at 2baefe6 [master] Add missing nil check

Back to archive index
Kouhei Sutou null+****@clear*****
Mon Nov 26 17:15:55 JST 2018


Kouhei Sutou	2018-11-26 17:15:55 +0900 (Mon, 26 Nov 2018)

  Revision: 2baefe67db6f80f28eb23bbb25ba6b67405e994e
  https://github.com/groonga/grntest/commit/2baefe67db6f80f28eb23bbb25ba6b67405e994e

  Message:
    Add missing nil check

  Modified files:
    lib/grntest/test-runner.rb

  Modified: lib/grntest/test-runner.rb (+7 -5)
===================================================================
--- lib/grntest/test-runner.rb    2018-11-19 12:39:43 +0900 (e3bf8ed)
+++ lib/grntest/test-runner.rb    2018-11-26 17:15:55 +0900 (93acf9e)
@@ -379,11 +379,13 @@ call chdir("#{context.temporary_directory_path}")
           end
           yield(executor)
         ensure
-          if executor.shutdown(pid)
-            pid = nil
-          else
-            wait_groonga_http_shutdown(pid_file_path)
-            pid = nil if wait_pid(pid)
+          if pid
+            if executor.shutdown(pid)
+              pid = nil
+            else
+              wait_groonga_http_shutdown(pid_file_path)
+              pid = nil if wait_pid(pid)
+            end
           end
         end
       ensure
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.osdn.me/mailman/archives/groonga-commit/attachments/20181126/c71ce862/attachment-0001.html>


More information about the Groonga-commit mailing list
Back to archive index