Skip to content

Commit

Permalink
rgw: shut down timer before erroring out
Browse files Browse the repository at this point in the history
Fixes: ceph#11145
Backport: hammer

Clean up initialization timer, otherwise if we error out, we'll assert.

Signed-off-by: Yehuda Sadeh <[email protected]>
  • Loading branch information
yehudasa committed Mar 23, 2015
1 parent 3216a58 commit 924ace8
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/rgw/rgw_main.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1066,6 +1066,11 @@ int main(int argc, const char **argv)
int r = 0;
RGWRados *store = RGWStoreManager::get_storage(g_ceph_context, true, true);
if (!store) {
mutex.Lock();
init_timer.cancel_all_events();
init_timer.shutdown();
mutex.Unlock();

derr << "Couldn't init storage provider (RADOS)" << dendl;
return EIO;
}
Expand Down

0 comments on commit 924ace8

Please sign in to comment.