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

切换网络的时候出现重复连接失败--连接成功--连接失败 #8

Open
Jeromeer opened this issue May 21, 2019 · 4 comments

Comments

@Jeromeer
Copy link

作者你好,非常感谢你提供的思路和代码,但是我在使用你的demo时,发现如题问题,当我连接成功之后,正常发送消息,此时切换一下wifi(从一个wifi切换到另一个wifi),会出现一只重复连接失败--连接成功--连接失败这样循环,日志如图
image
我debug看了一下,发现问题可能出在TCPChannelInitializerHandler上,它重复的创建,重复添加了几个handler,可能导致之前的handler中channelInactive方法被多次回调,而出发重连,不知有其他小伙伴遇到这种问题没有

@tmx0456
Copy link

tmx0456 commented May 31, 2019

我也遇到相同的问题,请问你解决了么?

@Jeromeer
Copy link
Author

Jeromeer commented Jun 3, 2019

@tmx0456 解决了 但是正想着怎么跟作者说这个事,加了群了

@zyp306856379
Copy link

我也遇到了成功失败成功失败 想问下 怎么解决的呢?

@Pro-Z
Copy link

Pro-Z commented Apr 25, 2022

怎么解决的,息屏后一段时间就会出现

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

4 participants