Open devleejb opened 7 months ago
Fix issue with continuous PushPullChanges requests after detaching document
This PR addresses a bug where continuous PushPullChanges requests are sent even after detaching a document, causing errors in the process. The issue occurs when navigating back triggers the document detach process.
In the yorkie-js-sdk, when editing a document, PushPullChanges requests are sent at specified intervals. However, the problem arises when detaching a document in the sdk. Despite the detach operation, the loop responsible for sending PushPullChanges requests is not terminated. As a result, the yorkie server receives requests for a detached document, leading to errors.
Once an error occurs, the loop is terminated, preventing further issues from arising.
In the yorkie-js-sdk, detaching a document should ideally stop the process of sending PushPullChanges requests, ensuring that only relevant and active documents trigger these requests. before sending request change DocumentStatus detached.
I found a bug and want to fix it, but I couldn't because it's an issue with the yorkie-js-sdk
@hackerwins May I ask for your opinion?
I found a bug and want to fix it, but I couldn't because it's an issue with the yorkie-js-sdk
It looks like this will have to be resolved in the JS SDK. and we are working on https://github.com/yorkie-team/yorkie-js-sdk/issues/856.
@jeonghye-choi @rappire Could we work together?
I want to try to solve this problem, but jeonghye-choi is already in charge, can I work on it?
What happened: When clicking the back button in the document, an error message stating "document not attached" is displayed.
What you expected to happen: Clicking the back button should navigate to the previous page without any error message.
How to reproduce it (as minimally and precisely as possible):
Anything else we need to know?: The error message occurs consistently whenever the back button is clicked.
Environment: