Skip to content

Conversation

@alltheblinkythings
Copy link

It's an error to call tcp_poll() on a pcb that has been converted to a
listening socket via tcp_listen(), with such calls causing memory corruption.
Call tcp_close to destroy the socket instead in ~TcpServer, and NULL out tcp
to suppress the call to tcp_poll in the base class
(via ~TcpConnection()->TcpConnection::close()->tcp_poll()).

It's an error to call tcp_poll() on a pcb that has been converted to a
listening socket via tcp_listen(), with such calls causing memory corruption.
Call tcp_close to destroy the socket instead in ~TcpServer, and NULL out tcp
to suppress the call to tcp_poll in the base class
(via ~TcpConnection()->TcpConnection::close()->tcp_poll()).
@hreintke
Copy link
Collaborator

@alltheblinkythings :
I am looking into your remarks.
Tcp_poll is not called by Sming framework, it comes from the LWIP processes.
I think you are right on tcp_close() calling in ~TcpServer
Will comment further shortly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants