Skip to content

Commit cd82f8a

Browse files
committed
fix(httpServer): Fixed compiler warning regarding nodiscard
1 parent 86409d5 commit cd82f8a

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

readme.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,4 +59,8 @@ Make an issue or contact me via Discord (kleins#9003) / [Twitter (@kleinschrader
5959

6060
### Does this libary support HTTPS?
6161

62-
Yes, check the example for more info.
62+
Yes, check the example for more info.
63+
64+
### Can i use this project to serve static files.
65+
66+
Only manually for now.

source/httpServer/httpServer.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,10 +60,10 @@ void kleins::httpServer::newConnection(kleins::connectionBase* conn) {
6060
conn->startOwnTickLoop();
6161
}
6262

63-
std::async(std::launch::async,[conn](){
63+
std::thread([conn](){
6464
conn->join();
6565
delete conn;
66-
});
66+
}).detach();
6767
}
6868

6969
void kleins::httpServer::on(const std::string& method,const std::string& uri, const std::function<void(httpParser*)> callback)

0 commit comments

Comments
 (0)