|
From: | Sachs, Nico |
Subject: | [lwip-users] Netconn Client |
Date: | Wed, 18 Aug 2021 15:32:54 +0000 |
Hi there. I have a netconn client which tries to connect forever. My application works fine for some hours, and then some weird things starts to appear, memp malloc fails for example and then another (connected) Netconn server
stops to work. The Netconn client can not connect because its not there, that’s fine. It sends out every 2 second a syn forever.. Now if I disable this try to connect thread, it runs forever without problems. Could some please have a look at this piece of code if there is something wrong what
I’m doing?
conn = netconn_new_with_callback(NETCONN_TCP, com_netconn_cb); netconn_bind(conn, IP_ADDR_ANY, 0); netconn_set_nonblocking(conn, 0); while (netconn_connect(conn, &remoteip, TCPPORT) != ERR_OK) {
if ( should_i_stop() ) { comstate = COMSTATE_DISCONNECTED; netconn_delete(conn); break; } netconn_delete(conn); conn = netconn_new_with_callback(NETCONN_TCP, com_netconn_cb); netconn_bind(conn, IP_ADDR_ANY, 0); netconn_set_nonblocking(conn, 0); } Thanks in advance Nico |
[Prev in Thread] | Current Thread | [Next in Thread] |