mirror of
https://github.com/yhirose/cpp-httplib.git
synced 2025-05-15 09:18:27 +00:00
Prevent an implicit capture of 'this' via '[=]' (#381)
This commit is contained in:
parent
26deffe0c6
commit
7b3cea5317
1 changed files with 5 additions and 1 deletions
|
@ -3390,7 +3390,11 @@ inline bool Server::listen_internal() {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
task_queue->enqueue([=]() { process_and_close_socket(sock); });
|
#if __cplusplus > 201703L
|
||||||
|
task_queue->enqueue([=, this]() { process_and_close_socket(sock); });
|
||||||
|
#else
|
||||||
|
task_queue->enqueue([=]() { process_and_close_socket(sock); });
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
task_queue->shutdown();
|
task_queue->shutdown();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue