capnweb-experimental-hibernation 0.6.2 → 0.6.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.
@@ -2768,6 +2768,7 @@ var RpcSessionImpl = class {
2768
2768
  for (let i in this.imports) {
2769
2769
  let id = Number(i);
2770
2770
  if (id === 0) continue;
2771
+ if (id > 0) continue;
2771
2772
  let entry = this.imports[i];
2772
2773
  if (!entry) continue;
2773
2774
  if (entry.resolution) continue;
@@ -3385,7 +3386,10 @@ async function __experimental_newHibernatableWebSocketRpcSession(webSocket, loca
3385
3386
  webSocket.close(1011, "stale session");
3386
3387
  } catch {
3387
3388
  }
3388
- throw err;
3389
+ if (options.sessionStore) {
3390
+ await options.sessionStore.delete(sessionId);
3391
+ }
3392
+ return void 0;
3389
3393
  }
3390
3394
  throw err;
3391
3395
  }
@@ -4189,7 +4193,7 @@ function __experimental_newDurableObjectSessionStore(storage, prefix = "capnweb:
4189
4193
  await storage.put(`${prefix}${sessionId}`, snapshot);
4190
4194
  },
4191
4195
  async delete(sessionId) {
4192
- await storage.delete?.(`${prefix}${sessionId}`);
4196
+ await storage.delete(`${prefix}${sessionId}`);
4193
4197
  }
4194
4198
  };
4195
4199
  }