enhance logic

This commit is contained in:
zizifn
2022-12-06 15:22:54 +08:00
committed by zizifn
parent 96c877f52f
commit 6f16d2fc3c
7 changed files with 300 additions and 70 deletions

View File

@@ -54,7 +54,9 @@ const httpServer = createServer(async (req, resp) => {
() => {
console.log('connected');
resp.writeHead(200);
rawHttp.pipe(socket).pipe(resp);
process.nextTick(() => {
rawHttp.pipe(socket).pipe(resp);
});
}
);