anchao commented on a change in pull request #5030:
URL: https://github.com/apache/incubator-nuttx/pull/5030#discussion_r771828108
##########
File path: arch/sim/src/sim/up_usrsock_host.c
##########
@@ -238,6 +239,7 @@ int usrsock_host_socket(int domain, int type, int protocol)
return -errno;
}
+ setsockopt(ret, SOL_SOCKET, SO_REUSEADDR, &opt, sizeof(opt));
Review comment:
this is mainly to solve the nuttx abnormal exit and fails to shutdown
the socket fd,
the usage of native socket is a little special, not all applications reuse
the address in the userspace
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]