mirror of
https://github.com/denoland/deno.git
synced 2025-09-26 12:19:12 +00:00
Use top-level for-await in various places (#3217)
This commit is contained in:
parent
71efe6f2c5
commit
f484776384
9 changed files with 94 additions and 125 deletions
|
@ -3,7 +3,6 @@ const hostname = "0.0.0.0";
|
|||
const port = 8080;
|
||||
const listener = Deno.listen({ hostname, port });
|
||||
console.log(`Listening on ${hostname}:${port}`);
|
||||
while (true) {
|
||||
const conn = await listener.accept();
|
||||
for await (const conn of listener) {
|
||||
Deno.copy(conn, conn);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue