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

platform_net_socket_recv_timeout 区分超时与连接断开 #96

Open
Zmmfly opened this issue Jan 26, 2024 · 0 comments
Open

platform_net_socket_recv_timeout 区分超时与连接断开 #96

Zmmfly opened this issue Jan 26, 2024 · 0 comments

Comments

@Zmmfly
Copy link

Zmmfly commented Jan 26, 2024

仅仅只有一个setsockopt设置超时时间,在超时或者服务端连接主动断开的情况下,无法有效识别连接断开

建议增加通过 getsockopt 获取 SO_ERROR值,进行判断是 EAGAIN,还是 ENOTCONN 等其它连接异常错误,

以便提升连接丢失情况下的重连速度

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

1 participant