@softtechai/quickmcp 1.0.13 → 1.0.16
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/package.json +1 -1
- package/quickmcp-direct-stdio.js +3 -3
package/package.json
CHANGED
package/quickmcp-direct-stdio.js
CHANGED
|
@@ -60,8 +60,9 @@ if (process.env.QUICKMCP_ENABLE_WEB === '1') {
|
|
|
60
60
|
try { fs.mkdirSync(uploadsDir, { recursive: true }); } catch {}
|
|
61
61
|
if (!process.env.QUICKMCP_UPLOAD_DIR) process.env.QUICKMCP_UPLOAD_DIR = uploadsDir;
|
|
62
62
|
|
|
63
|
-
//
|
|
64
|
-
const
|
|
63
|
+
// Determine preferred port and acquire a simple lock so only one process owns the UI for that port
|
|
64
|
+
const preferredPort = parseInt(process.env.PORT || '3000', 10);
|
|
65
|
+
const lockPath = path.join(runDir, `ui-${preferredPort}.lock`);
|
|
65
66
|
let hasLock = false;
|
|
66
67
|
try {
|
|
67
68
|
const fd = fs.openSync(lockPath, 'wx');
|
|
@@ -83,7 +84,6 @@ if (process.env.QUICKMCP_ENABLE_WEB === '1') {
|
|
|
83
84
|
}
|
|
84
85
|
|
|
85
86
|
// Only start Web UI if preferred port is actually free.
|
|
86
|
-
const preferredPort = parseInt(process.env.PORT || '3000', 10);
|
|
87
87
|
const probe = net.createServer();
|
|
88
88
|
probe.once('error', (err) => {
|
|
89
89
|
if (err && (err.code === 'EADDRINUSE' || err.code === 'EACCES')) {
|