Inkplate 6Motion : function beginPacket often fails

In the examples for using UDP, there is this page:

which gives an example for using UDP. I followed it for my project, and I notice frequent failures on executing beginPacket(). More than once every three attempts, it returns false for no reason, which makes the wifi initialisation fail quite often.

This function merely clears 3 filters in the ESP32. I do not know what goes wrong, but such a failure rate is very disappointing.

I think I tracked down the issue with the end() function where it would not clear the filters properly causing the filters to accumulate without being freed and ESP would run out of room in its filter table. I pushed the fix to the udp-issue branch.