@ai-ecoverse/slicc-kernel 1.163.1 → 1.164.1

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/node.js CHANGED
@@ -2020,6 +2020,10 @@ var KernelSocket = class _KernelSocket {
2020
2020
  if (bytes.length === 0 && this.reset) throw this.reset;
2021
2021
  return bytes;
2022
2022
  }
2023
+ connectReset() {
2024
+ const at = this.peer?.family === "inet" ? ` ${this.peer.host}:${this.peer.port}` : "";
2025
+ return `connect ECONNRESET${at}`;
2026
+ }
2023
2027
  drained(rx) {
2024
2028
  if (this.refused && rx.buffered === 0) throw this.refused;
2025
2029
  }
@@ -2203,6 +2207,7 @@ var KernelSocket = class _KernelSocket {
2203
2207
  signal.throwIfAborted();
2204
2208
  this.served = true;
2205
2209
  let handshaking = true;
2210
+ let heard = false;
2206
2211
  const view2 = {
2207
2212
  localAddr: "",
2208
2213
  remoteAddr: "",
@@ -2210,10 +2215,12 @@ var KernelSocket = class _KernelSocket {
2210
2215
  const bytes = await raw2.rx.read(SERVE_CHUNK, handshaking ? signal : void 0).catch(() => EMPTY);
2211
2216
  if (bytes.length === 0 && this.refused)
2212
2217
  throw new KernelError("ECONNRESET", "read ECONNRESET");
2218
+ heard ||= bytes.length > 0;
2213
2219
  return bytes.length > 0 ? bytes : null;
2214
2220
  },
2215
2221
  write: (bytes) => raw2.tx.write(bytes).catch((err) => {
2216
- throw this.refused ? new KernelError("ECONNRESET", "read ECONNRESET") : err;
2222
+ if (!this.refused) throw err;
2223
+ throw new KernelError("ECONNRESET", heard ? "read ECONNRESET" : this.connectReset());
2217
2224
  }),
2218
2225
  closeWrite: () => raw2.tx.closeWrite(),
2219
2226
  close: () => {
@@ -3677,7 +3684,7 @@ function satisfies(version, range2) {
3677
3684
  }
3678
3685
 
3679
3686
  // src/version.ts
3680
- var KERNEL_VERSION = true ? "1.163.1" : "0.0.0-dev";
3687
+ var KERNEL_VERSION = true ? "1.164.1" : "0.0.0-dev";
3681
3688
  var OS_RELEASE = "6.0.0-slicc";
3682
3689
  function procVersion() {
3683
3690
  return `Linux version ${OS_RELEASE} (slicc-kernel ${KERNEL_VERSION}) #1 SMP PREEMPT_DYNAMIC