Hi Guys
I have a Arduino MEGA with the EthernetV2 shield acting as a client which communicates to another Arduino MEGA with EthernetV2 shield acting as a server.
Communication between the 2 boards is fine with the exception of a repeatable occurring issue on the client board.
After 259 loop iterations (~17 seconds since start) the client hangs for 28.5 seconds at this section of code.
bytes = client.write(datagram, strlen(datagram));
After the time has passed the board is able to reconnect easily where it then runs for another ~17 seconds before hanging once more.
I'm thinking there is a memory leak in the code though if I remove this line of code the program will run for significantly longer, though I haven't tested how much longer. This makes me believe there is some other issue occurring though I'm not sure where.
I'm currently out of ideas as to whats going on and would greatly appreciate any assistance provided
Thanks in advance
code.ino (8.66 KB)