hypha-rpc 0.20.53 → 0.20.54

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.
@@ -0,0 +1,8 @@
1
+ # pytest cache directory #
2
+
3
+ This directory contains data from the pytest's cache plugin,
4
+ which provides the `--lf` and `--ff` options, as well as the `cache` fixture.
5
+
6
+ **Do not** commit this to version control.
7
+
8
+ See [the docs](https://docs.pytest.org/en/stable/how-to/cache.html) for more information.
@@ -1257,7 +1257,8 @@ class RPC extends _utils__WEBPACK_IMPORTED_MODULE_0__.MessageEmitter {
1257
1257
  // Generate debugging information for the method
1258
1258
  remote_method.__rpc_object__ = encoded_method;
1259
1259
  const parts = method_id.split(".");
1260
- remote_method.__name__ = parts[parts.length - 1];
1260
+
1261
+ remote_method.__name__ = encoded_method._rname || parts[parts.length - 1];
1261
1262
  if (remote_method.__name__.includes("#")) {
1262
1263
  remote_method.__name__ = remote_method.__name__.split("#")[1];
1263
1264
  }
@@ -1609,6 +1610,7 @@ class RPC extends _utils__WEBPACK_IMPORTED_MODULE_0__.MessageEmitter {
1609
1610
  _rtarget: this._client_id,
1610
1611
  _rmethod: annotation.method_id,
1611
1612
  _rpromise: "*",
1613
+ _rname: aObject.name,
1612
1614
  };
1613
1615
  } else {
1614
1616
  (0,_utils__WEBPACK_IMPORTED_MODULE_0__.assert)(typeof session_id === "string");
@@ -1624,6 +1626,7 @@ class RPC extends _utils__WEBPACK_IMPORTED_MODULE_0__.MessageEmitter {
1624
1626
  _rtarget: this._client_id,
1625
1627
  _rmethod: `${session_id}.${object_id}`,
1626
1628
  _rpromise: "*",
1629
+ _rname: aObject.name,
1627
1630
  };
1628
1631
  let store = this._get_session_store(session_id, true);
1629
1632
  (0,_utils__WEBPACK_IMPORTED_MODULE_0__.assert)(
@@ -5266,7 +5269,12 @@ class WebsocketRPCConnection {
5266
5269
  disconnect(reason) {
5267
5270
  this._closed = true;
5268
5271
  this._last_message = null; // Clear last message on disconnect
5269
- if (this._websocket && this._websocket.readyState === WebSocket.OPEN) {
5272
+ // Ensure websocket is closed if it exists and is not already closed or closing
5273
+ if (
5274
+ this._websocket &&
5275
+ this._websocket.readyState !== WebSocket.CLOSED &&
5276
+ this._websocket.readyState !== WebSocket.CLOSING
5277
+ ) {
5270
5278
  this._websocket.close(1000, reason);
5271
5279
  }
5272
5280
  if (this._refresh_token_task) {