diff options
author | George Hazan <george.hazan@gmail.com> | 2013-03-21 18:36:10 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2013-03-21 18:36:10 +0000 |
commit | 01b1b443b89cdff245c23c03af37718c7d0c90cd (patch) | |
tree | 2f058638ff8890cddf46373ef2cd624962fadc84 /protocols/MRA/src/Mra_proto.cpp | |
parent | 530ca4410d99e166f4bbf1d6ba23e348a53d4743 (diff) |
fix for closing thread handles in MRA
git-svn-id: http://svn.miranda-ng.org/main/trunk@4152 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/MRA/src/Mra_proto.cpp')
-rw-r--r-- | protocols/MRA/src/Mra_proto.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/protocols/MRA/src/Mra_proto.cpp b/protocols/MRA/src/Mra_proto.cpp index fb441ea976..ea501f1dcd 100644 --- a/protocols/MRA/src/Mra_proto.cpp +++ b/protocols/MRA/src/Mra_proto.cpp @@ -123,7 +123,10 @@ void CMraProto::MraThreadClean() SleepEx(100, FALSE);// to prevent high CPU load by some status plugins like allwaysonline
- hThreadWorker = NULL;
+ if (hThreadWorker) {
+ CloseHandle(hThreadWorker);
+ hThreadWorker = NULL;
+ }
InterlockedExchange((volatile LONG*)&dwThreadWorkerRunning, FALSE);
SetStatus(ID_STATUS_OFFLINE);
}
|