X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=win%2Finspircd_namedpipe.cpp;h=a460f41a2b9d0627f4996dde3ca8793e715215ad;hb=67c12453047f009692da518774ed6e49ee0acb9a;hp=f86af73e23b6a48fafbd054ebdd0ff2f9be31ee3;hpb=1bdc61df779bbd74ca8641cde512dc0a1d8be4c0;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/win/inspircd_namedpipe.cpp b/win/inspircd_namedpipe.cpp index f86af73e2..a460f41a2 100644 --- a/win/inspircd_namedpipe.cpp +++ b/win/inspircd_namedpipe.cpp @@ -8,7 +8,8 @@ IPCThread::IPCThread(InspIRCd* Instance) : Thread(), ServerInstance(Instance) { - initwmi(); + if (!initwmi()) + ServerInstance->Logs->Log("IPC", DEBUG, "Could not initialise WMI. CPU percantage reports will not be available."); } IPCThread::~IPCThread() @@ -23,19 +24,19 @@ void IPCThread::Run() while (GetExitFlag() == false) { Pipe = CreateNamedPipe (Pipename, - PIPE_ACCESS_DUPLEX, // read/write access - PIPE_TYPE_MESSAGE | // message type pipe - PIPE_READMODE_MESSAGE | // message-read mode - PIPE_WAIT, // blocking mode - PIPE_UNLIMITED_INSTANCES, // max. instances - MAXBUF, // output buffer size - MAXBUF, // input buffer size - 1000, // client time-out - NULL); // no security attribute + PIPE_ACCESS_DUPLEX, // read/write access + PIPE_TYPE_MESSAGE | // message type pipe + PIPE_READMODE_MESSAGE | // message-read mode + PIPE_WAIT, // blocking mode + PIPE_UNLIMITED_INSTANCES, // max. instances + MAXBUF, // output buffer size + MAXBUF, // input buffer size + 1000, // client time-out + NULL); // no security attribute if (Pipe == INVALID_HANDLE_VALUE) { - SleepEx(500, true); + SleepEx(10, true); continue; } @@ -167,4 +168,4 @@ IPC::~IPC() { thread->SetExitFlag(); delete thread; -} \ No newline at end of file +}