msg/async/Event: remove global_centers assert

In tests we allow to reset EventCenter instance in the same CephContext,
so it may let global_centers->centers to set the same position multi times.

Signed-off-by: Haomai Wang <haomai@xsky.com>
This commit is contained in:
Haomai Wang 2016-07-15 15:20:10 +08:00
parent 6d3e495de2
commit 9bfd11e7f9

View File

@ -140,7 +140,7 @@ void EventCenter::set_owner()
if (!global_centers) { if (!global_centers) {
cct->lookup_or_create_singleton_object<EventCenter::AssociatedCenters>( cct->lookup_or_create_singleton_object<EventCenter::AssociatedCenters>(
global_centers, "AsyncMessenger::EventCenter::global_center"); global_centers, "AsyncMessenger::EventCenter::global_center");
assert(global_centers && !global_centers->centers[idx]); assert(global_centers);
global_centers->centers[idx] = this; global_centers->centers[idx] = this;
notify_handler = new C_handle_notify(this, cct); notify_handler = new C_handle_notify(this, cct);
int r = create_file_event(notify_receive_fd, EVENT_READABLE, notify_handler); int r = create_file_event(notify_receive_fd, EVENT_READABLE, notify_handler);