Skip to content
This repository has been archived by the owner on Sep 10, 2024. It is now read-only.

Fix incorrect SWOOLE_PROCESS value #451

Merged

Conversation

m3m0r7
Copy link
Contributor

@m3m0r7 m3m0r7 commented Nov 24, 2020

Hello, I found a bug that the SWOOLE_PROCESS value is incorrect.
In swoole MODE_PROCESS is 2, not 3.

See: https://github.com/swoole/swoole-src/blob/b09a7e9acb2c19c91f2c69df449c9fa77be5d010/include/swoole_server.h#L511
and https://github.com/swoole/swoole-src/blob/b09a7e9acb2c19c91f2c69df449c9fa77be5d010/ext-src/php_swoole.cc#L426

In some cases, It will get an error when running a server with SWOOLE_PROCESS on swoole_http.php config file.
It will show Swoole\Server::__construct(): invalid $mode parameters 3

See: https://github.com/swoole/swoole-src/blob/b09a7e9acb2c19c91f2c69df449c9fa77be5d010/ext-src/swoole_server.cc#L1994

@m3m0r7 m3m0r7 changed the title Fix invalid SWOOLE_PROCESS value Fix incorrect SWOOLE_PROCESS value Nov 24, 2020
@coveralls
Copy link

Coverage Status

Coverage remained the same at 68.386% when pulling b3e824a on memfork:fix-invalid-swoole-process-number into 254d08a on swooletw:master.

@Arkanius
Copy link
Contributor

Thanks for your contribution!

It looks right

@albertcht
Copy link
Member

Hi @m3m0r7 ,

Thanks a lot for you pull request!

@albertcht albertcht merged commit 714cb6d into swooletw:master Nov 24, 2020
@m3m0r7 m3m0r7 deleted the fix-invalid-swoole-process-number branch November 24, 2020 22:33
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants