From 54f7ddb6bdb5c73ac303d3139cdb6da71ae6de18 Mon Sep 17 00:00:00 2001 From: Jason Volk Date: Sat, 23 Mar 2019 02:39:03 -0700 Subject: [PATCH] modules/client/rooms/state: Log an error when a state event fetch fails during sync. --- modules/client/sync/rooms/state.cc | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/modules/client/sync/rooms/state.cc b/modules/client/sync/rooms/state.cc index c87185a94..73250915f 100644 --- a/modules/client/sync/rooms/state.cc +++ b/modules/client/sync/rooms/state.cc @@ -171,7 +171,17 @@ ircd::m::sync::room_state_polylog_events(data &data) //assert(event.valid); if(unlikely(!event.valid)) + { + assert(data.room); + log::error + { + log, "Failed to fetch event idx:%lu in room %s state.", + event_idx, + string_view{data.room->room_id} + }; + return; + } const std::lock_guard lock{mutex}; room_state_append(data, array, event, event_idx);