9remote 0.1.39 → 0.1.41
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/cli.cjs +3 -3
- package/dist/server.cjs +39 -39
- package/index.js +3 -1
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -341,6 +341,9 @@ async function startServerAndTunnel(selectedKey) {
|
|
|
341
341
|
return null;
|
|
342
342
|
}
|
|
343
343
|
|
|
344
|
+
// tunnelProcess declared here so the serverManager crash callback can reference it
|
|
345
|
+
let tunnelProcess = null;
|
|
346
|
+
|
|
344
347
|
// Start server with auto-restart
|
|
345
348
|
const serverManager = startServerWithRestart(null, async () => {
|
|
346
349
|
// Callback khi server crash - đợi server ready rồi gửi SIGHUP
|
|
@@ -431,7 +434,6 @@ async function startServerAndTunnel(selectedKey) {
|
|
|
431
434
|
|
|
432
435
|
// Spawn cloudflared with token and auto-restart callback
|
|
433
436
|
console.log(ORANGE("✅ Starting tunnel..."));
|
|
434
|
-
let tunnelProcess;
|
|
435
437
|
|
|
436
438
|
const startTunnel = async (tunnelToken) => {
|
|
437
439
|
try {
|