Strange UDP bug

Hi!

I have only figured out there might be a timeout behaviour with UDP socket whilst working on my project last night. My solution for it was simply to call the begin() and stop() each time packets need to be sent:

void sendUDP(byte *cmd) {
  Udp.begin(localPort);
  Udp.beginPacket(remoteIp1, remotePort1);
  Udp.write(cmd, 2);
  Udp.endPacket();
  Udp.stop();
}

I am an absolute beginner working with Arduino and was wondering if there is any problem doing so, other than the possibly slower response?