> Your conservative approach is the right thing to do since basically,
> what you are trying to do is not supported! Calling netconn_close()
> while the connection waits in netconn_accept() means you are using
one
> netconn from two different threads, which is not supported.
I have one Taks per netconn and I have an EventTask
that relays commands to these socket Tasks. When my main application tells all subsystems to shut
down and free their resources, the eventTask sends command_close to all
socket Tasks. This works good for all Tasks except the ones waiting
in netconn_accept() because the tasks won't execute the close command. So I took the close command out of the socketTasks
and close them directly from the eventTask.
So yes, I access one netconn from two different task
- only in this specific event.
I'd be glad if you could give me any ideas on how
to achieve this behaviour in another way (and not setting recv_timeo and
polling accept!)