Prevent an implicit capture of 'this' via '[=]' (#381)

This commit is contained in:
Oleg Vorobiov 2020-03-12 23:31:22 +07:00 committed by GitHub
parent 26deffe0c6
commit 7b3cea5317
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -3390,7 +3390,11 @@ inline bool Server::listen_internal() {
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();