If I stop the dhcp server task with _task_destroy() the listener seems to be left open. How can I make sure ALL resources are released when killing a listener task?
Solved! Go to Solution.
I'm not sure if RTCS alows to send dummy "unblock" messages...
Well, there's an option to pass RTCS_MSG_NONBLOCK flag to recvfrom() function and loop over it with some _time_delay(ms).
PetrM
This is a bad design, the server is not supposed to quit.
The right way is to add the functionality into the server task - as a reaction on some message or event, shutdown the socket, release resources and return.
PetrM
I am facing the same problem can u tell me how to release the resource .
In while (1) loop , I am shutting down the socket and trying to create the socket and it is throwing error in bind().
The error code is 0x1633.
Thanks in advance
Netra
What if the task is blocking with recvfrom? Can I do something to get it to return?
I'm not sure if RTCS alows to send dummy "unblock" messages...
Well, there's an option to pass RTCS_MSG_NONBLOCK flag to recvfrom() function and loop over it with some _time_delay(ms).
PetrM