Skip to content
Snippets Groups Projects
Commit 9efd3f83 authored by Gregory Nutt's avatar Gregory Nutt
Browse files

uIP webserver: Missing logic to close sockets on loop termination. From Max.

parent 336205d3
No related branches found
No related tags found
No related merge requests found
...@@ -816,7 +816,7 @@ static void single_server(uint16_t portno, pthread_startroutine_t handler, int s ...@@ -816,7 +816,7 @@ static void single_server(uint16_t portno, pthread_startroutine_t handler, int s
if (acceptsd < 0) if (acceptsd < 0)
{ {
ndbg("accept failure: %d\n", errno); ndbg("accept failure: %d\n", errno);
break;; break;
} }
nvdbg("Connection accepted -- serving sd=%d\n", acceptsd); nvdbg("Connection accepted -- serving sd=%d\n", acceptsd);
...@@ -851,6 +851,11 @@ static void single_server(uint16_t portno, pthread_startroutine_t handler, int s ...@@ -851,6 +851,11 @@ static void single_server(uint16_t portno, pthread_startroutine_t handler, int s
(void)httpd_handler((void*)acceptsd); (void)httpd_handler((void*)acceptsd);
} }
/* Close the sockets */
close(acceptsd);
close(listensd);
} }
#endif #endif
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment