Open tabascoeye opened 10 years ago
found another possible race condition when using sockets from multiple thread contexts: the setsockopt calls are handled via a tcpip_callback() so it can happen that the stack only processes them when the socket itself is already closed. Then, inside the lwip_setsockopt_internal() function, writes to NULL pointers are made on sock->conn->pcb.ip
When a socket is used from different tasks at the same time, the stack behavior is basically undefined.
To slowly work towards the goal of having a thread-safe stack that is still "light weight", we'll try to do the following bits: