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

websocket for swoole 4.4.0 is not work #307

Closed
zhongjq opened this issue Jul 14, 2019 · 3 comments
Closed

websocket for swoole 4.4.0 is not work #307

zhongjq opened this issue Jul 14, 2019 · 3 comments

Comments

@zhongjq
Copy link

zhongjq commented Jul 14, 2019

Make sure you read Issues Guideline and answer these questions before submitting your issue. Thanks!
(Any non-English issues will be closed immediately.)

  1. Please provide your PHP and Swoole version. (php -v and php --ri swoole)
    php 7.3.7
    swoole 4.4.0

  2. Please provide your Laravel/Lumen version.
    5.7.*

  3. Which release version of this package are you using?
    2.6.63

  4. What did you do? If possible, provide a recipe for reproducing the error.

websocket is not work

log

ErrorException: Swoole\WebSocket\Server::push(): the connected client of connection[5] is not a websocket client or closed in /mnt/data/wwwroot/test.qtopay.net/vendor/swooletw/laravel-swoole/src/Websocket/SocketIO/WebsocketHandler.php:36
Stack trace:
#0 /mnt/data/wwwroot/test.qtopay.net/vendor/sentry/sentry/lib/Raven/Breadcrumbs/ErrorHandler.php(34): Illuminate\Foundation\Bootstrap\HandleExceptions->handleError(2, 'Swoole\WebSocke...', '/mnt/data/wwwro...', 36, Array)
#1 [internal function]: Raven_Breadcrumbs_ErrorHandler->handleError(2, 'Swoole\WebSocke...', '/mnt/data/wwwro...', 36, Array)
#2 /mnt/data/wwwroot/test.qtopay.net/vendor/swooletw/laravel-swoole/src/Websocket/SocketIO/WebsocketHandler.php(36): Swoole\WebSocket\Server->push(5, '0{"sid":"NWQyYW...')
#3 /mnt/data/wwwroot/test.qtopay.net/vendor/swooletw/laravel-swoole/src/Concerns/InteractsWithWebsocket.php(95): SwooleTW\Http\Websocket\SocketIO\WebsocketHandler->onOpen(5, Object(Illuminate\Http\Request))
#4 {main}

  1. What did you expect to see?

  2. What did you see instead?

degrade swoole to 4.3.5 it's work success

@albertcht
Copy link
Member

I will check it soon.

@mxp100
Copy link
Contributor

mxp100 commented Jul 15, 2019

add to nginx config
proxy_http_version 1.1;

@zhongjq
Copy link
Author

zhongjq commented Jul 18, 2019

add to nginx config
proxy_http_version 1.1;

@mxp100 Thanks, It's work!

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

No branches or pull requests

3 participants