diff options
author | Benoit Foucher <benoit@zeroc.com> | 2019-06-28 15:00:37 +0200 |
---|---|---|
committer | Benoit Foucher <benoit@zeroc.com> | 2019-06-28 15:00:37 +0200 |
commit | af4b16cd5756a549d561c23cda906161c4d219b8 (patch) | |
tree | d67f5e45695a15b42c8b98259ad45db03017fc5e /cpp/src/Ice | |
parent | Added back caching of output stream, fixes #414 (#415) (diff) | |
download | ice-af4b16cd5756a549d561c23cda906161c4d219b8.tar.bz2 ice-af4b16cd5756a549d561c23cda906161c4d219b8.tar.xz ice-af4b16cd5756a549d561c23cda906161c4d219b8.zip |
Fixed timer to release task outside the synchronization block, fixes #352
Diffstat (limited to 'cpp/src/Ice')
-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; + } } } } |