Thread 고치기
This commit is contained in:
@@ -16,9 +16,9 @@ int main() {
|
||||
auto config = Chattr::ConfigManager::load();
|
||||
Chattr::log::setDefaultLogger(config.logLevel, config.logFileName, config.logfileSize, config.logfileCount);
|
||||
|
||||
struct Chattr::TCPSocket sock;
|
||||
Chattr::TCPSocket sock;
|
||||
struct Chattr::Address serveraddr;
|
||||
struct Chattr::TCPSocket clientSock;
|
||||
Chattr::TCPSocket clientSock;
|
||||
struct Chattr::Address clientAddr;
|
||||
if (config.ipVersion == 4) {
|
||||
sock.init(AF_INET);
|
||||
@@ -59,7 +59,7 @@ int main() {
|
||||
spdlog::info("Waiting for connection...");
|
||||
sock.accept(clientSock, clientAddr);
|
||||
|
||||
threadPool.enqueueJob(_TCPClient, std::move(clientSock), clientAddr);
|
||||
// threadPool.enqueueJob(_TCPClient, std::move(clientSock), clientAddr);
|
||||
|
||||
Chattr::Thread thread_(_TCPClient, std::move(clientSock), clientAddr);
|
||||
thread_.detach();
|
||||
|
||||
Reference in New Issue
Block a user