Navigation Menu

Skip to content

Commit

Permalink
Detach timers correctly on shutdown
Browse files Browse the repository at this point in the history
  • Loading branch information
piroor committed Apr 23, 2015
1 parent e7664d1 commit e2deeae
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lib/droonga/engine.rb
Expand Up @@ -81,10 +81,10 @@ def stop_gracefully
@cluster.shutdown
on_finish = lambda do
logger.trace("stop_gracefully/on_finish: start")
@export_last_processed_message_timestamp_observer.stop
export_last_processed_message_timestamp
@dispatcher.stop_gracefully do
@state.shutdown
@export_last_processed_message_timestamp_observer.stop
export_last_processed_message_timestamp
yield
end
logger.trace("stop_gracefully/on_finish: done")
Expand All @@ -102,11 +102,11 @@ def stop_gracefully
# It may be called after stop_gracefully.
def stop_immediately
logger.trace("stop_immediately: start")
@export_last_processed_message_timestamp_observer.stop
export_last_processed_message_timestamp
@dispatcher.stop_immediately
@cluster.shutdown
@state.shutdown
@export_last_processed_message_timestamp_observer.stop
export_last_processed_message_timestamp
logger.trace("stop_immediately: done")
end

Expand Down

0 comments on commit e2deeae

Please sign in to comment.