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

Service restarted, client reconnect bug #189

Open
dongwenjia opened this issue Nov 2, 2023 · 5 comments
Open

Service restarted, client reconnect bug #189

dongwenjia opened this issue Nov 2, 2023 · 5 comments

Comments

@dongwenjia
Copy link

dongwenjia commented Nov 2, 2023

Yesterday, the code I pulled down, the TCP client and server were running on different machines (Linux) respectively. The client connected to the server, and everything was running normally. At this time, after restarting the server device operating system and starting the TCP service, it would cause the client to be unable to reconnect, always failing with a connection timeout. The only way to fix it was to close the client and then restart it. The client would then be able to connect. Note: The server device system is restarted, and the client remains running (supports disconnection and reconnection).

昨天拉下来的代码 tcp 客户端和服务器分别运行在不同机器上(linux),客户端连接上服务端,一切运行正常,这个时候把服务端设备操作系统从新启动后启动tcp服务,就会导致客户端重连不上服务,总是连接超时失败,只能关闭客户端,在启动客户端就能连接上,注意:服务器设备系统重新启动,客户端保持运行中(支持断线重连)

TRANS_BY_GITHUB_AI_ASSISTANT

@xia-chu
Copy link
Member

xia-chu commented Nov 2, 2023

What is the git hash?

看看git hash 呢?

TRANS_BY_GITHUB_AI_ASSISTANT

@dongwenjia
Copy link
Author

dongwenjia commented Nov 2, 2023

I just checked the code, you are: 28b7aea

我刚看了下代码,你是:28b7aea107089c17c6f10e8657d27a0815f85b25

TRANS_BY_GITHUB_AI_ASSISTANT

@xia-chu
Copy link
Member

xia-chu commented Nov 2, 2023

So are you using zlm as a TCP client or server?

所以你用zlm是作为tcp客户端还是服务端?

TRANS_BY_GITHUB_AI_ASSISTANT

@dongwenjia
Copy link
Author

dongwenjia commented Nov 3, 2023

所以你用zlm是作为tcp客户端还是服务端?
The client and server are mostly made with ZLToolKit. The test cases are test_tcpClient and test_tcpEchoServer. I just modified test_tcpClient to support reconnection.

所以你用zlm是作为tcp客户端还是服务端?
客户端和服务端 多是用 ZLToolKit 做的,测试用例是test_tcpClient 和 test_tcpEchoServer ,我只是在test_tcpClient 上修改了下支持断线重连功能,

TRANS_BY_GITHUB_AI_ASSISTANT

@xia-chu
Copy link
Member

xia-chu commented Nov 3, 2023

Take a look at the server-side and device-side logs?

看看服务端和设备端日志?

TRANS_BY_GITHUB_AI_ASSISTANT

@alexliyu7352 alexliyu7352 changed the title 服务重新启动,客户端重连bug Service restarted, client reconnect bug Sep 14, 2024
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