@coresource/hz 0.1.5 → 0.1.6
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/hz.mjs +10 -2
- package/package.json +1 -1
package/dist/hz.mjs
CHANGED
|
@@ -2083,9 +2083,17 @@ function defaultCreateWebSocket(url, options) {
|
|
|
2083
2083
|
return new WebSocket(url, { headers: options.headers });
|
|
2084
2084
|
}
|
|
2085
2085
|
function defaultRegisterSignalHandler(signal, handler) {
|
|
2086
|
-
|
|
2086
|
+
let fired = false;
|
|
2087
|
+
const wrapper = () => {
|
|
2088
|
+
if (fired) {
|
|
2089
|
+
process.exit(130);
|
|
2090
|
+
}
|
|
2091
|
+
fired = true;
|
|
2092
|
+
handler();
|
|
2093
|
+
};
|
|
2094
|
+
process.on(signal, wrapper);
|
|
2087
2095
|
return () => {
|
|
2088
|
-
process.off(signal,
|
|
2096
|
+
process.off(signal, wrapper);
|
|
2089
2097
|
};
|
|
2090
2098
|
}
|
|
2091
2099
|
function createMissionWebSocketUrl(endpoint, missionId) {
|