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
_______________________________________________
lwip-users mailing list
lwip-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/lwip-users

Reply via email to