HuolalaTech / page-spy-web

Debug remotely and easily like chrome devtools.
https://www.pagespy.org
MIT License
4.55k stars 271 forks source link

修复 `$pageSpy.abort()` 误清除了一些事件 #205

Closed wqcstrong closed 5 months ago

wqcstrong commented 5 months ago

Describe the bug

发现问题的代码:

useEffect(() => {
  window.$pageSpy = new window.PageSpy({
    api: "localhost:6752",
  });
  return () => {
    window.$pageSpy.abort();
  };
}, []);

$pageSpy.abort() 会调用 socketStore.close(),导致所有的事件被清除,再次连接时,follow socketStore 的事件无法恢复。

Steps to reproduce

No response

System Info

/

Logs

No response

Validations