- Fri Jun 12, 2015 9:39 pm
#20308
I have been working on code for a UDP server. It is a simple server that sends a datagram back to the remote host whenever it receives a datagram on a specific port. The app seems to work correctly over many iterations (as tested with the SendPacket application) as long as I comment out the deallocation of a data structure that I use to track connections (of course this results in a memory leak). With the deallocation present, which occurs after the reply is sent back to the remote host, the app doesn't respond to any further datagrams.
I've been testing this using the v1.1.0 SDK.
I've stripped the app down to the essential code to demonstrate the issue. Someone with access to the core code should be able to determine what is happening that causes the apparent heap corruption. The demo code can be found at the URL below. The readme.txt file in the .zip file has further details on the line of code that affects the behavior.
http://www.kinzers.com/bluebird/esp8266_UDP_server.zip