Copilot suggestion

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
Thomas Göttgens 2025-07-19 16:11:44 +02:00 committed by GitHub
parent 85a4a1b67d
commit af3ddddcf4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -37,7 +37,11 @@ bool AsyncUDP::writeTo(const uint8_t *data, size_t len, IPAddress ip, uint16_t p
// AsyncUDPPacket
AsyncUDPPacket::AsyncUDPPacket(EthernetUDP &source) : _udp(source), _remoteIP(source.remoteIP()), _remotePort(source.remotePort())
{
_readLength = _udp.read(_buffer, sizeof(_buffer));
if (_udp.available() > 0) {
_readLength = _udp.read(_buffer, sizeof(_buffer));
} else {
_readLength = 0;
}
}
IPAddress AsyncUDPPacket::remoteIP()