Skip to content

Jitsi Meet - Secure, Simple and Scalable Video Conferences that you use as a standalone app or embed in your web application.

fix(logging): Keeps the log storage ready when there is conference error.

damenchoe5fa25892ec3
diff --git a/react/features/base/logging/JitsiMeetLogStorage.ts b/react/features/base/logging/JitsiMeetLogStorage.ts
index 373c8bdcd9..1cf5c4b6f2 100644
--- a/react/features/base/logging/JitsiMeetLogStorage.ts
+++ b/react/features/base/logging/JitsiMeetLogStorage.ts
@@ -39,9 +39,10 @@ export default class JitsiMeetLogStorage {
* <tt>false</tt> otherwise.
*/
isReady() {
- const { conference } = this.getState()['features/base/conference'];
+ const { conference, error: conferenceError } = this.getState()['features/base/conference'];
+ const { error: connectionError } = this.getState()['features/base/connection'];
- return Boolean(conference);
+ return Boolean(conference || conferenceError || connectionError);
}
/**
diff --git a/react/features/base/logging/middleware.ts b/react/features/base/logging/middleware.ts
index 40807a8019..3e180ea6e2 100644
--- a/react/features/base/logging/middleware.ts
+++ b/react/features/base/logging/middleware.ts
@@ -4,7 +4,7 @@ import { AnyAction } from 'redux';
import { IStore } from '../../app/types';
import { APP_WILL_MOUNT } from '../app/actionTypes';
-import { CONFERENCE_JOINED } from '../conference/actionTypes';
+import { CONFERENCE_FAILED, CONFERENCE_JOINED } from '../conference/actionTypes';
import { getCurrentConference } from '../conference/functions';
import { SET_CONFIG } from '../config/actionTypes';
import JitsiMeetJS, {
@@ -35,6 +35,15 @@ MiddlewareRegistry.register(store => next => action => {
case CONFERENCE_JOINED:
return _conferenceJoined(store, next, action);
+ case CONFERENCE_FAILED: {
+ const result = next(action);
+ const { logCollector } = store.getState()['features/base/logging'];
+
+ logCollector?.flush();
+
+ return result;
+ }
+
case LIB_WILL_INIT:
return _libWillInit(store, next, action);