hypha-rpc 0.21.31 → 0.21.32

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -86,7 +86,7 @@
86
86
  <div class='footer quiet pad2 space-top1 center small'>
87
87
  Code coverage generated by
88
88
  <a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
89
- at 2026-03-04T22:36:31.483Z
89
+ at 2026-03-06T00:02:24.136Z
90
90
  </div>
91
91
  <script src="prettify.js"></script>
92
92
  <script>
@@ -4538,7 +4538,15 @@ class RPC extends _utils_index_js__WEBPACK_IMPORTED_MODULE_0__.MessageEmitter {
4538
4538
  delete this._rintfCallerIndex[clientId];
4539
4539
  let cleaned = 0;
4540
4540
  for (const sid of serviceIds) {
4541
- if (this._services[sid]) {
4541
+ const svc = this._services[sid];
4542
+ if (svc) {
4543
+ if (typeof svc._dispose === "function") {
4544
+ try {
4545
+ svc._dispose();
4546
+ } catch (e) {
4547
+ /* ignore errors from dispose handlers */
4548
+ }
4549
+ }
4542
4550
  delete this._services[sid];
4543
4551
  cleaned++;
4544
4552
  }