fix for pid == -1
authorMichael Wallner <mike@php.net>
Tue, 29 Sep 2020 06:34:32 +0000 (08:34 +0200)
committerMichael Wallner <mike@php.net>
Tue, 29 Sep 2020 06:34:32 +0000 (08:34 +0200)
test/lib/Server.cpp

index f31819e86ef8dfbc3fa99d9ded1335b34945d55c..0c99009bde95b910c81ce97ae24a985fc1acbaca 100644 (file)
@@ -130,7 +130,7 @@ bool Server::isListening() {
   }
 
   Malloced stat(memcached_stat(*memc, nullptr, nullptr));
-  if (!*stat || !stat->pid) {
+  if (!*stat || !stat->pid || stat->pid == -1) {
     return false;
   }
   if (stat->pid != pid) {