Skip to content
This repository has been archived by the owner on Jan 20, 2025. It is now read-only.

fix AsyncClient::connect memory leak #138

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions src/ESPAsyncTCP.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -265,6 +265,9 @@ bool AsyncClient::connect(IPAddress ip, uint16_t port){
tcp_arg(pcb, this);
tcp_err(pcb, &_s_error);
size_t err = tcp_connect(pcb, &addr, port,(tcp_connected_fn)&_s_connected);
if (err != ERR_OK){
tcp_close(pcb);
xfan1024 marked this conversation as resolved.
Show resolved Hide resolved
}
return (ERR_OK == err);
}

Expand Down