cheatengine 5.8.23 → 5.8.24
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/ce_mcp_server.js +13 -0
- package/package.json +1 -1
- package/src/pipe-client.js +10 -0
package/ce_mcp_server.js
CHANGED
|
@@ -370,6 +370,19 @@ class CEMCPServer {
|
|
|
370
370
|
// ============ Entry Point ============
|
|
371
371
|
function main() {
|
|
372
372
|
const server = new CEMCPServer();
|
|
373
|
+
|
|
374
|
+
// Handle uncaught exceptions to prevent crash
|
|
375
|
+
process.on('uncaughtException', (err) => {
|
|
376
|
+
log.error(`Uncaught Exception: ${err.message}`);
|
|
377
|
+
log.error(err.stack);
|
|
378
|
+
// Don't exit, try to continue
|
|
379
|
+
});
|
|
380
|
+
|
|
381
|
+
process.on('unhandledRejection', (reason, promise) => {
|
|
382
|
+
log.error(`Unhandled Rejection at: ${promise}, reason: ${reason}`);
|
|
383
|
+
// Don't exit, try to continue
|
|
384
|
+
});
|
|
385
|
+
|
|
373
386
|
server.run();
|
|
374
387
|
}
|
|
375
388
|
|
package/package.json
CHANGED
package/src/pipe-client.js
CHANGED
|
@@ -281,6 +281,16 @@ class PipeClient extends EventEmitter {
|
|
|
281
281
|
}
|
|
282
282
|
}
|
|
283
283
|
}
|
|
284
|
+
|
|
285
|
+
// Set up a one-time close handler to reject if socket closes while waiting
|
|
286
|
+
const closeHandler = () => {
|
|
287
|
+
this.pendingResponse = null;
|
|
288
|
+
reject(new Error('Socket closed while waiting for response'));
|
|
289
|
+
};
|
|
290
|
+
|
|
291
|
+
if (this.socket) {
|
|
292
|
+
this.socket.once('close', closeHandler);
|
|
293
|
+
}
|
|
284
294
|
});
|
|
285
295
|
}
|
|
286
296
|
|