diff options
author | Hoa V. DINH <dinh.viet.hoa@gmail.com> | 2013-06-24 08:36:32 -0700 |
---|---|---|
committer | CodaFi <devteam.codafi@gmail.com> | 2013-06-27 22:38:25 -0600 |
commit | c86c32761e44cfe1e42aa8b0b3512c232c0917e6 (patch) | |
tree | 143e2b7c4b672cb2890e71044966fa981fdc4b0f /src | |
parent | 9bd493e7419a2debe3bddb0f9aa00f543e5a7275 (diff) |
Fixed crash when a method is scheduled twice to perform after delay. Fixed #149.
Diffstat (limited to 'src')
-rw-r--r-- | src/async/imap/MCIMAPAsyncConnection.cc | 1 | ||||
-rw-r--r-- | src/async/smtp/MCSMTPAsyncSession.cc | 1 | ||||
-rw-r--r-- | src/core/basetypes/MCOperationQueue.cc | 1 |
3 files changed, 3 insertions, 0 deletions
diff --git a/src/async/imap/MCIMAPAsyncConnection.cc b/src/async/imap/MCIMAPAsyncConnection.cc index ed40932c..2891d439 100644 --- a/src/async/imap/MCIMAPAsyncConnection.cc +++ b/src/async/imap/MCIMAPAsyncConnection.cc @@ -482,6 +482,7 @@ void IMAPAsyncConnection::tryAutomaticDisconnect() return; } + cancelDelayedPerformMethod((Object::Method) &IMAPAsyncConnection::tryAutomaticDisconnectAfterDelay, NULL); performMethodAfterDelay((Object::Method) &IMAPAsyncConnection::tryAutomaticDisconnectAfterDelay, NULL, 30); } diff --git a/src/async/smtp/MCSMTPAsyncSession.cc b/src/async/smtp/MCSMTPAsyncSession.cc index 73bc2a54..723c0330 100644 --- a/src/async/smtp/MCSMTPAsyncSession.cc +++ b/src/async/smtp/MCSMTPAsyncSession.cc @@ -157,6 +157,7 @@ void SMTPAsyncSession::tryAutomaticDisconnect() return; } + cancelDelayedPerformMethod((Object::Method) &SMTPAsyncSession::tryAutomaticDisconnectAfterDelay, NULL); performMethodAfterDelay((Object::Method) &SMTPAsyncSession::tryAutomaticDisconnectAfterDelay, NULL, 30); } diff --git a/src/core/basetypes/MCOperationQueue.cc b/src/core/basetypes/MCOperationQueue.cc index e448c237..666758cc 100644 --- a/src/core/basetypes/MCOperationQueue.cc +++ b/src/core/basetypes/MCOperationQueue.cc @@ -127,6 +127,7 @@ void OperationQueue::callbackOnMainThread(Operation * op) void OperationQueue::checkRunningOnMainThread(void * context) { + cancelDelayedPerformMethod((Object::Method) &OperationQueue::checkRunningAfterDelay, NULL); performMethodAfterDelay((Object::Method) &OperationQueue::checkRunningAfterDelay, NULL, 1); } |