On 21/05/2019 13:55, ricardoschoof wrote:
Dear Terry,
This morning I started a similar thread:
http://lwip.100.n7.nabble.com/Socket-Connection-closed-before-sending-all-data-td34503.html,
except I use sockets instead of netconn.
Did you manage to find a solution for your problem?
--
Sent from: http://lwip.100.n7.nabble.com/lwip-users-f3.html
_______________________________________________
lwip-users mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/lwip-users
No I haven't found a proper solution to the problem. Adding a short
delay (1ms) between my last netconn_write() and the netconn_close()
works around the issue.
while(1){
// Accept any incoming connection
accept_err = netconn_accept(osocketListen, &osocket);
if(accept_err == ERR_OK){
dl4printf("Listen: accept connection\n");
netconn_set_recvtimeout(osocket, 10000);
// Serve connection
err = processRequest();
// We shouldn't need this but TCP write packets can be lost
if we don't for some reason
delayMs(1);
// Close connection
netconn_close(osocket);
// Delete connection
netconn_delete(osocket);
osocket = 0;
}
}
_______________________________________________
lwip-users mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/lwip-users