Page 1 of 1

Socket error message:Software caused connection abort

Posted: Thu Dec 06, 2018 9:19 am
by zhoupeng
IDFv3.1:
1、The device is in station mode and connects to the server via wifi.
2、Possible error message due to network instability。
3、After the error occurs, tcp can't connect again. udp can only send data unacceptable.
4、The server cannot be successfully tested by the ping command.

Re: Socket error message:Software caused connection abort

Posted: Thu Dec 06, 2018 10:53 pm
by PeterR
What errno do you get?
A guess - Do you close your socket after disconnect?
LwIP only has a few sockets available so it is quite easy to forget to close one & then you can no longer connect.

Re: Socket error message:Software caused connection abort

Posted: Fri Dec 07, 2018 1:16 am
by zhoupeng
PeterR wrote:
Thu Dec 06, 2018 10:53 pm
What errno do you get?
A guess - Do you close your socket after disconnect?
LwIP only has a few sockets available so it is quite easy to forget to close one & then you can no longer connect.
thanks for the reply.
1、errno = 113.
2、After getting the error, I have done the following:shutdown(Socket, 0);close(Socket).
3、Udp and tcp use different sockets.