Skip to content

Commit 03982f1

Browse files
committed
Fix: do not echo complete buffer, only as much bytes as have been received.
1 parent 1842cc6 commit 03982f1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: examples/UDP_Server/UDP_Server.ino

+1-1
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ void loop()
155155

156156
/* Send back a reply, to the IP address and port we got the packet from. */
157157
tc6_inst->beginPacket(tc6_inst->remoteIP(), tc6_inst->remotePort());
158-
tc6_inst->write((const uint8_t *)udp_rx_msg_buf, sizeof(udp_rx_msg_buf));
158+
tc6_inst->write((const uint8_t *)udp_rx_msg_buf, packet_size);
159159
tc6_inst->endPacket();
160160
}
161161
}

0 commit comments

Comments
 (0)