diff --git a/communication b/communication index 407c52ca43..9673971e92 160000 --- a/communication +++ b/communication @@ -1 +1 @@ -Subproject commit 407c52ca437011ab2bb988c2cf7d103d6b83ff8a +Subproject commit 9673971e9257bd167074b78921de746184604289 diff --git a/packages/presentation/src/communication.ts b/packages/presentation/src/communication.ts index 7a4f1424ae..664818f37d 100644 --- a/packages/presentation/src/communication.ts +++ b/packages/presentation/src/communication.ts @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. // -import { initLiveQueries, refreshLiveQueries } from '@hcengineering/communication-client-query' +import { closeLiveQueries, initLiveQueries, refreshLiveQueries } from '@hcengineering/communication-client-query' import { type AddAttachmentsOperation, type AddCollaboratorsEvent, @@ -458,3 +458,8 @@ export async function refreshCommunicationClient (): Promise { console.log('refreshCommunicationClient') await refreshLiveQueries() } + +export async function purgeCommunicationClient (): Promise { + client.close() + closeLiveQueries() +} diff --git a/plugins/workbench-resources/src/connect.ts b/plugins/workbench-resources/src/connect.ts index f5dd528433..21c0f92e62 100644 --- a/plugins/workbench-resources/src/connect.ts +++ b/plugins/workbench-resources/src/connect.ts @@ -35,6 +35,7 @@ import platform, { import presentation, { loadServerConfig, purgeClient, + purgeCommunicationClient, refreshClient, refreshCommunicationClient, setClient, @@ -175,6 +176,7 @@ export async function connect (title: string): Promise { // We need to flush all data from memory await ctx.with('purge-client', {}, async () => { await purgeClient() + await purgeCommunicationClient() }) await ctx.with('close previous client', {}, async () => { await _client?.close()