@cadenza.io/service 2.3.3 → 2.3.4

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.
package/dist/index.mjs CHANGED
@@ -1468,7 +1468,7 @@ var RestController = class _RestController {
1468
1468
  }
1469
1469
  let resultContext;
1470
1470
  try {
1471
- const response = await this.fetchDataWithTimeout(
1471
+ resultContext = await this.fetchDataWithTimeout(
1472
1472
  `${URL}/delegation`,
1473
1473
  {
1474
1474
  headers: {
@@ -1479,7 +1479,6 @@ var RestController = class _RestController {
1479
1479
  },
1480
1480
  3e4
1481
1481
  );
1482
- resultContext = await response.json();
1483
1482
  } catch (e) {
1484
1483
  console.error("Error in delegation", e);
1485
1484
  resultContext = {
@@ -1946,6 +1945,7 @@ var SocketController = class _SocketController {
1946
1945
  };
1947
1946
  socket.on("connect", () => {
1948
1947
  if (handshake) return;
1948
+ console.log("socket connected");
1949
1949
  CadenzaService.emit(`meta.socket_client.connected:${fetchId}`, ctx);
1950
1950
  });
1951
1951
  socket.on("delegation_progress", (ctx2) => {
@@ -2127,7 +2127,7 @@ var SocketController = class _SocketController {
2127
2127
  `meta.socket_client.disconnected:${fetchId}`,
2128
2128
  `meta.fetch.handshake_failed:${fetchId}`,
2129
2129
  `meta.socket_client.connect_error:${fetchId}`
2130
- ).emits("meta.socket_client_shutdown_complete");
2130
+ ).attachSignal("meta.fetch.handshake_requested").emits("meta.socket_client_shutdown_complete");
2131
2131
  return true;
2132
2132
  },
2133
2133
  "Connects to a specified socket server"