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

网线异常断开之后如何保证重连的?我在应用中发现当网线异常被拔掉再重插,会出现不能连接的问题 #36

Open
Qzzsy opened this issue Nov 8, 2019 · 3 comments

Comments

@Qzzsy
Copy link

Qzzsy commented Nov 8, 2019

我在应用中发现,当我应用检测到网线被拔掉之后,我调用wiz_closesocket去关闭被打开的端口,发现无法关闭,导致重插网线后连接异常的问题出现,目前的解决办法是注释掉WIZ_INIT_STATUS_CHECK,但不知会不会引发其他异常

@Lawlieta
Copy link
Collaborator

嗯,wiz_closesocket 函数中不应判断网线连接时候断开,这个最近我处理一下

@zhigangbox
Copy link

看来这确实这个问题,我的是用w5500+libmodbus通讯,过一段时间后出现再无法连上问题。已经被这个问题折磨的很久了,这个问题不高低,项目就失败了。

@xiangxistu
Copy link
Collaborator

wiznet 底层会时刻判断网线是否断开或者是连接,重新连接后会重新获取 IP( 使用 DHCP 或者静态 IP 的方式 )。

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