Skip to content

Commit 82f0041

Browse files
committed
fix Timer.clear release error.
1 parent 29a8389 commit 82f0041

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

fibjs/include/Timer.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ class Timer : public Timer_base,
2929
// Timer_base
3030
virtual result_t clear()
3131
{
32-
if (m_cancel.CompareAndSwap(0, 1))
32+
if (m_cancel.CompareAndSwap(0, 1) == 0)
3333
exlib::Fiber::cancel_sleep(this);
3434

3535
return 0;

0 commit comments

Comments
 (0)