-
-
Notifications
You must be signed in to change notification settings - Fork 7k
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
WiFi shield client does not release socket on connect fail (with fix) #1720
Comments
If I am not wrong, this should be merged with #1637. |
No. This is a separate issue. UDP does not establish a connection like TCP. The section of code this bug is in has nothing to do with UDP. I provided a fix above that has been tested. It was simply a single line omission in the code. If you think it is the same, install the fix above and try UDP. It won't fix the UDP problem. This is tested on IDE v1.0.5 with the v1.1.0 firmware upgrade. I tested UDP and did not find the socket release problem discussed in the other issue. Here is my socket test. Install it and call it between UDP transactions. It was instrumental in troubleshooting the client socket fail.
|
... I believe that is 10 seconds, not 1 second. I.e. 1000 ms = 1 second. 10000 ms = 10 seconds. |
I tried the fix you suggested, but even after calling client.close(), I still have some ports in use. I'm using IDE 1.0.5-r2 and WiFi shield firmware 1.1.0 |
This issue was moved to arduino-libraries/WiFi#5 |
The wifi shield client code is not releasing the socket when the connection fails. This results in the client using all the sockets in 4 failed attempts, and the connection will fail until the Arduino is reset/rebooted.
IDE v1.0.5 and v1.5.5.
Here is the fix. This is in WiFiClient.cpp
The text was updated successfully, but these errors were encountered: