Closed tobowers closed 8 months ago
Description creating a new HocuspocusProvider does not allow a nodejs process to terminate due to event listeners still attached in Awareness creation.
HocuspocusProvider
Adding an this.awareness?.destroy() during destroy fixes the issue.
destroy
Steps to reproduce the bug Steps to reproduce the behavior: https://gist.github.com/tobowers/4746fda90322d585b1e10c1fa0d4e4b0
Expected behavior All event listeners and sockets are cleaned up during destroy and nodejs can exit.
Environment?
Additional context This is the line: https://github.com/ueberdosis/hocuspocus/blob/main/packages/provider/src/HocuspocusProvider.ts#L175
I was unable to npm install in the repo, or else I'd open a PR.
npm install
Thanks for the report! Will be fixed in the next release (this week).
Description creating a new
HocuspocusProvider
does not allow a nodejs process to terminate due to event listeners still attached in Awareness creation.Adding an this.awareness?.destroy() during
destroy
fixes the issue.Steps to reproduce the bug Steps to reproduce the behavior: https://gist.github.com/tobowers/4746fda90322d585b1e10c1fa0d4e4b0
Expected behavior All event listeners and sockets are cleaned up during destroy and nodejs can exit.
Environment?
Additional context This is the line: https://github.com/ueberdosis/hocuspocus/blob/main/packages/provider/src/HocuspocusProvider.ts#L175
I was unable to
npm install
in the repo, or else I'd open a PR.