Skip to content

Commit

Permalink
Disable Hocuspocus websocket since server is no longer deployed.
Browse files Browse the repository at this point in the history
  • Loading branch information
raineorshine committed Apr 27, 2024
1 parent 85dde12 commit 616ab6b
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
7 changes: 6 additions & 1 deletion src/data-providers/yjs/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,12 @@ if (process.env.NODE_ENV !== 'test') {
}

// websocket provider
export const websocket = new HocuspocusProviderWebsocket({ url: websocketUrl })
export const websocket = new HocuspocusProviderWebsocket({
// disable websocket since YJS is being sunset and server is no longer deployed.
// eslint-disable-next-line no-constant-condition
connect: false,
url: websocketUrl,
})
export const websocketProviderPermissions = new HocuspocusProvider({
// disable awareness for performance
// doclog doc has awareness enabled to keep the websocket open
Expand Down
7 changes: 6 additions & 1 deletion src/data-providers/yjs/thoughtspace.ts
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,12 @@ export const init = async (options: ThoughtspaceOptions) => {

// websocket provider
// TODO: Reuse websocket connection from ./index?
const websocket = new HocuspocusProviderWebsocket({ url: websocketUrl })
const websocket = new HocuspocusProviderWebsocket({
// disable websocket since YJS is being sunset and server is no longer deployed.
// eslint-disable-next-line no-constant-condition
connect: false,
url: websocketUrl,
})

doclog = new Y.Doc({ guid: encodeDocLogDocumentName(tsid) })

Expand Down

0 comments on commit 616ab6b

Please sign in to comment.