Comparing version 1.164.1 to 1.164.2
@@ -304,9 +304,2 @@ "use strict"; | ||
const { useAbortSignal } = options; | ||
const maybeAbortSignal = useAbortSignal | ||
? ` | ||
if (abortSignal) abortSignal.addEventListener("abort", () => { | ||
observer.error(abortSignal.reason); | ||
client.close(); | ||
});` | ||
: ""; | ||
return (0, ts_poet_1.code) ` | ||
@@ -348,10 +341,23 @@ invoke<T extends UnaryMethodDefinitionish>( | ||
}); | ||
observer.add(() => { | ||
${!useAbortSignal | ||
? `return client.close();` | ||
: `if (!abortSignal || !abortSignal.aborted) | ||
return client.close();`} | ||
}); | ||
${useAbortSignal | ||
? ` | ||
if (abortSignal) { | ||
const abort = () => { | ||
observer.error(abortSignal.reason); | ||
client.close(); | ||
}; | ||
abortSignal.addEventListener("abort", abort); | ||
observer.add(() => { | ||
if (abortSignal.aborted) { | ||
return; | ||
} | ||
${maybeAbortSignal} | ||
abortSignal.removeEventListener('abort', abort); | ||
client.close(); | ||
}); | ||
} else { | ||
observer.add(() => client.close()); | ||
} | ||
` | ||
: `observer.add(() => client.close());`} | ||
}); | ||
@@ -358,0 +364,0 @@ upStream(); |
{ | ||
"name": "ts-proto", | ||
"version": "1.164.1", | ||
"version": "1.164.2", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "main": "build/plugin.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
337688
5868