fix(node-agent): make http server handler async

This commit is contained in:
Wild Dragon Dev 2026-06-04 01:54:38 +00:00
parent df6ca084ff
commit 4045e30cd2

View file

@ -1434,7 +1434,7 @@ function serveLiveFile(pathname, res) {
} }
// ── HTTP server ─────────────────────────────────────────────────────────── // ── HTTP server ───────────────────────────────────────────────────────────
const server = http.createServer((req, res) => { const server = http.createServer(async (req, res) => {
const { pathname } = new URL(req.url, 'http://localhost'); const { pathname } = new URL(req.url, 'http://localhost');
if (req.method === 'GET' && pathname === '/health') { if (req.method === 'GET' && pathname === '/health') {