From cf49da44660b9e33d31d368fc510169e8574f7c2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Simon=20St=C3=BCcher?= Date: Mon, 10 May 2021 13:11:30 +0200 Subject: [PATCH] fix: Typo FPM_REQUEST_INFO (#134) * Typo FPM_REQUEST_INFO See `[FPM_REQUEST_INFO] = "Getting request information",` in https://github.com/php/php-src/blob/07fa13088e1349f4b5a044faeee57f2b34f6b6e4/sapi/fpm/fpm/fpm_request.c#L27 * Fallback for PHP<7.4 --- phpfpm/phpfpm.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/phpfpm/phpfpm.go b/phpfpm/phpfpm.go index 1e1c8c1..400c233 100644 --- a/phpfpm/phpfpm.go +++ b/phpfpm/phpfpm.go @@ -40,8 +40,9 @@ const PoolProcessRequestFinishing string = "Finishing" // PoolProcessRequestReadingHeaders defines a process that is reading headers. const PoolProcessRequestReadingHeaders string = "Reading headers" -// PoolProcessRequestInfo defines a process that is getting request information. +// PoolProcessRequestInfo defines a process that is getting request information. Was changed in PHP 7.4 to PoolProcessRequestInfo74 const PoolProcessRequestInfo string = "Getting request informations" +const PoolProcessRequestInfo74 string = "Getting request information" // PoolProcessRequestEnding defines a process that is about to end. const PoolProcessRequestEnding string = "Ending" @@ -230,6 +231,7 @@ func CountProcessState(processes []PoolProcess) (active int64, idle int64, total case PoolProcessRequestEnding: case PoolProcessRequestFinishing: case PoolProcessRequestInfo: + case PoolProcessRequestInfo74: case PoolProcessRequestReadingHeaders: active++ default: