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

This commit is contained in:
Oleg Vorobiov authored and GitHub committed 2020-03-12 12:31:22 -04:00
1 parent 26deffe0c6
commit 7b3cea5317
1 file changed
+5 -1
+5 -1
View File
@@ -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();