diff --git a/src/tribler/gui/event_request_manager.py b/src/tribler/gui/event_request_manager.py index 88f68108c57..dd815883bd0 100644 --- a/src/tribler/gui/event_request_manager.py +++ b/src/tribler/gui/event_request_manager.py @@ -130,9 +130,12 @@ def on_error(self, error: int, reschedule_on_err: bool): return if self.receiving_data: - # Most probably Core is crashed. If CoreManager decides to restart the core, - # it will also call event_manager.connect_to_core() - self._logger.error('The connection to the Tribler Core was lost') + # Most probably Core crashed, but we try to reconnect anyway one single time to be sure. + # Later, if Core crashed and CoreManager decides to restart the core, it will also call + # event_manager.connect_to_core(reschedule_on_err=True) + self.receiving_data = False + self._logger.error('The connection to the Tribler Core was lost, trying to reconnect one single time') + self.reconnect(reschedule_on_err=False) return should_retry = reschedule_on_err and time.time() < self.start_time + CORE_CONNECTION_TIMEOUT