mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-11-15 06:33:55 +01:00
[web] close connection permanently when opening out-of-sync modal (#23148)
* [web] close connection permanently when opening out-of-sync modal * [web] disable generic forceDisconnected behavior for out-of-sync modal * [web] hide "disconnected" banner when displaying out of sync modal GitOrigin-RevId: 133b3e24d94279917298ce7fd5d0a76da2265512
This commit is contained in:
@@ -98,7 +98,7 @@ export const EditorManagerProvider: FC = ({ children }) => {
|
||||
const { projectId } = useIdeReactContext()
|
||||
const { reportError, eventEmitter, eventLog } = useIdeReactContext()
|
||||
const { setOutOfSync } = useEditorContext()
|
||||
const { socket, disconnect, connectionState } = useConnectionContext()
|
||||
const { socket, closeConnection, connectionState } = useConnectionContext()
|
||||
const { view, setView } = useLayoutContext()
|
||||
const { showGenericMessageModal, genericModalVisible, showOutOfSyncModal } =
|
||||
useModalsContext()
|
||||
@@ -580,7 +580,7 @@ export const EditorManagerProvider: FC = ({ children }) => {
|
||||
// Do not re-join after re-connecting.
|
||||
document.leaveAndCleanUp()
|
||||
|
||||
disconnect()
|
||||
closeConnection('out-of-sync')
|
||||
reportError(error, meta)
|
||||
|
||||
// Tell the user about the error state.
|
||||
@@ -605,7 +605,7 @@ export const EditorManagerProvider: FC = ({ children }) => {
|
||||
}
|
||||
}
|
||||
}, [
|
||||
disconnect,
|
||||
closeConnection,
|
||||
docError,
|
||||
docTooLongErrorShown,
|
||||
eventEmitter,
|
||||
|
||||
Reference in New Issue
Block a user