Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Two Swoole (HTTP and TCP) servers in same php file not working #59

Open
RUBLONM opened this issue Sep 27, 2023 · 1 comment
Open

Two Swoole (HTTP and TCP) servers in same php file not working #59

RUBLONM opened this issue Sep 27, 2023 · 1 comment

Comments

@RUBLONM
Copy link

RUBLONM commented Sep 27, 2023

Hi,

Having two servers working well when launched independantly but when included/called together in one same php file, only the first one (TCP) is working.

When i invert the two requires, it still works but this time the first (HTTP) is working.

Can't figure out what's happening.

Websocket.zip

Would appreciate any help

@lotharthesavior
Copy link
Contributor

@RUBLONM I'm not sure if you solved it already, but the problem is that you have them running synchronously and are just including them in the same file. If you want them to run from the same file, consider using OpenSwoole\Process (https://openswoole.com/docs/modules/swoole-process).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants