Skip to content

Commit

Permalink
fix Timer.clear release error.
Browse files Browse the repository at this point in the history
  • Loading branch information
xicilion committed May 15, 2017
1 parent 29a8389 commit 82f0041
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fibjs/include/Timer.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ class Timer : public Timer_base,
// Timer_base
virtual result_t clear()
{
if (m_cancel.CompareAndSwap(0, 1))
if (m_cancel.CompareAndSwap(0, 1) == 0)
exlib::Fiber::cancel_sleep(this);

return 0;
Expand Down

0 comments on commit 82f0041

Please sign in to comment.