Skip to content
Snippets Groups Projects
Commit 248af6cc authored by Saleh Ahmed Khan's avatar Saleh Ahmed Khan
Browse files

Code made safer, eliminate risk of stray processes/wasted resources by exiting threads

parent c426b950
Branches master
No related tags found
No related merge requests found
......@@ -79,6 +79,7 @@ int main(int argc, char *argv[]) {
read(newsockfd, buffer, BUF-1);
parse_request_and_send_response(root, buffer, newsockfd);
close(newsockfd);
exit(0);
}
close(newsockfd);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment