This repository has been archived by the owner on Aug 8, 2024. It is now read-only.
Possible race condition in RP2040 library #24
glenn-dickins
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
@GiungKim
Hey, I am using this library and going hard with the W5500 on RP2040.
I am doing some heavy traffic - about 25MBps of audio and HTTP.
I think I found a race condition - took me a while to trace it through, but I found sockets falling out of use, and the code was locking somewhere. I am load testing with about 200-300 HTTP connects/s.
Line 248 of socket.c in the listen function.
The state may have already progressed to SOCK_ESTABLISED
index 412a65d..0239e84 100644
--- a/Ethernet/socket.c
+++ b/Ethernet/socket.c
@@ -245,7 +245,7 @@ int8_t listen(uint8_t sn)
CHECK_SOCKINIT();
setSn_CR(sn,Sn_CR_LISTEN);
while(getSn_CR(sn));
{
close(sn);
return SOCKERR_SOCKCLOSED;
This helps a bit, though I am still chasing another lock condition.
Beta Was this translation helpful? Give feedback.
All reactions