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

egg项目使用socket.io-client无法正常连接到socket服务 #4588

Closed
iamsea opened this issue Jan 27, 2021 · 6 comments
Closed

egg项目使用socket.io-client无法正常连接到socket服务 #4588

iamsea opened this issue Jan 27, 2021 · 6 comments

Comments

@iamsea
Copy link

iamsea commented Jan 27, 2021

What happens?

egg项目A使用socket.io-client去连接另一个egg socket.io项目B,B能收到连接请求,但A一直连接不上反复重试。注:B项目的socket服务测试正常。

@egg-bot
Copy link

egg-bot commented Jan 27, 2021

Hello @iamsea. Please provide a reproducible example following the instruction.

Issues labeled by Need Reproduce will be closed if no activities in 7 days.


@iamsea,请根据这个说明提供最小可复现代码。

如果在 7 天内没有进展会被自动关闭。

1 similar comment
@egg-bot
Copy link

egg-bot commented Jan 27, 2021

Hello @iamsea. Please provide a reproducible example following the instruction.

Issues labeled by Need Reproduce will be closed if no activities in 7 days.


@iamsea,请根据这个说明提供最小可复现代码。

如果在 7 天内没有进展会被自动关闭。

@iamsea iamsea closed this as completed Jan 27, 2021
@iamsea
Copy link
Author

iamsea commented Jan 27, 2021

是socket.io-client使用的socket.io版本太高了,问题已经解决谢谢

@aisriver
Copy link

我也遇到了这个问题,egg-socket.io是不是需要升级一下,或者readme写一下socket.io-client支持的版本

@ruandao
Copy link

ruandao commented Jun 21, 2021

我也遇到这个问题了。。。一样是版本太低的原因

@doornot
Copy link

doornot commented Sep 25, 2021

可以参考 https://www.npmjs.com/package/@bonetm/egg-socket.io

“基于作者最后 4.1.6 一版更新 egg 框架的 socket.io 插件 原作者许久未更新, 将 socket.io 升级到了 3.0。packet 的 middleware 去掉了”

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

6 participants