Fix AsyncUDP buffer error

fixes: https://github.com/espressif/arduino-esp32/issues/2685
This commit is contained in:
Me No Dev 2019-05-13 23:18:38 +03:00 committed by GitHub
parent 0acf19af8f
commit e9389e3122
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -682,10 +682,11 @@ void AsyncUDP::_recv(udp_pcb *upcb, pbuf *pb, const ip_addr_t *addr, uint16_t po
if(_handler) { if(_handler) {
AsyncUDPPacket packet(this, this_pb, addr, port, netif); AsyncUDPPacket packet(this, this_pb, addr, port, netif);
_handler(packet); _handler(packet);
} } else {
pbuf_free(this_pb); pbuf_free(this_pb);
} }
} }
}
void AsyncUDP::_s_recv(void *arg, udp_pcb *upcb, pbuf *p, const ip_addr_t *addr, uint16_t port, struct netif * netif) void AsyncUDP::_s_recv(void *arg, udp_pcb *upcb, pbuf *p, const ip_addr_t *addr, uint16_t port, struct netif * netif)
{ {