Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: delete watcherMap when watcher is disposed #2910

Merged
merged 1 commit into from
Jul 20, 2023
Merged

fix: delete watcherMap when watcher is disposed #2910

merged 1 commit into from
Jul 20, 2023

Conversation

pipiiiiii
Copy link
Contributor

@pipiiiiii pipiiiiii commented Jul 19, 2023

Types

  • 🐛 Bug Fixes

Background or solution

🤖 Generated by Copilot at c0729dc

  • Handle file watcher disposal on connection loss (link)
  • Check if the original watcher is still valid using isDisposed() method (link)
  • Add isDisposed() method to FileServiceWatcher class (link)

Issue: #2909

重连时 node 会 dispose watcher,但是前端没有处理,所以需要加个判断

Changelog

🤖 Generated by Copilot at c0729dc

This pull request improves the file service's resilience to connection loss by handling the disposal and recreation of file watchers. It modifies file-service-client.ts and watcher.ts to implement this logic.

@pipiiiiii pipiiiiii requested review from erha19, Aaaaash and Ricbet July 19, 2023 09:46
@opensumi opensumi bot added the 🐞 bug Something isn't working label Jul 19, 2023
@codecov
Copy link

codecov bot commented Jul 19, 2023

Codecov Report

Patch coverage: 25.00% and project coverage change: -0.01 ⚠️

Comparison is base (ac1e2c7) 57.63% compared to head (65b276d) 57.62%.

Additional details and impacted files
@@            Coverage Diff             @@
##            v2.26    #2910      +/-   ##
==========================================
- Coverage   57.63%   57.62%   -0.01%     
==========================================
  Files        1337     1337              
  Lines       84130    84136       +6     
  Branches    17483    17485       +2     
==========================================
+ Hits        48485    48486       +1     
- Misses      32395    32400       +5     
  Partials     3250     3250              
Flag Coverage Δ
jsdom 52.64% <25.00%> (-0.01%) ⬇️
node 16.79% <0.00%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
packages/file-service/src/browser/watcher.ts 91.66% <0.00%> (-8.34%) ⬇️
...es/file-service/src/browser/file-service-client.ts 73.23% <33.33%> (-0.58%) ⬇️

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐞 bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants