Socket error message:Software caused connection abort

zhoupeng
Posts: 35
Joined: Sun Sep 24, 2017 1:31 pm

Socket error message:Software caused connection abort

Postby zhoupeng » Thu Dec 06, 2018 9:19 am

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.

PeterR
Posts: 621
Joined: Mon Jun 04, 2018 2:47 pm

Re: Socket error message:Software caused connection abort

Postby PeterR » 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.
& I also believe that IDF CAN should be fixed.

zhoupeng
Posts: 35
Joined: Sun Sep 24, 2017 1:31 pm

Re: Socket error message:Software caused connection abort

Postby zhoupeng » Fri Dec 07, 2018 1:16 am

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.

Who is online

Users browsing this forum: Vishna and 178 guests