diff options
Diffstat (limited to 'cpp/src/Ice/Timer.cpp')
-rw-r--r-- | cpp/src/Ice/Timer.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/cpp/src/Ice/Timer.cpp b/cpp/src/Ice/Timer.cpp index e573b905a9d..4f4e2e3f030 100644 --- a/cpp/src/Ice/Timer.cpp +++ b/cpp/src/Ice/Timer.cpp @@ -242,6 +242,16 @@ Timer::run() { consoleErr << "IceUtil::Timer::run(): uncaught exception" << endl; } + + if(token.delay == IceUtil::Time()) + { + // + // If thisthe task is not a repeated task, clear the task reference now rather than + // in the synchronization block above. Clearing the task reference might end up + // calling user code which could trigger a deadlock. See also issue #352. + // + token.task = ICE_NULLPTR; + } } } } |