mirror of
https://github.com/denoland/deno.git
synced 2025-03-03 09:31:22 -05:00
docs(example/tcp_echo): fix TCP echo leaking resources (#8997)
This commit is contained in:
parent
a3099798c8
commit
37a9d6678e
1 changed files with 1 additions and 1 deletions
|
@ -19,7 +19,7 @@ returns to the client anything it sends.
|
|||
const listener = Deno.listen({ port: 8080 });
|
||||
console.log("listening on 0.0.0.0:8080");
|
||||
for await (const conn of listener) {
|
||||
Deno.copy(conn, conn);
|
||||
Deno.copy(conn, conn).finally(() => conn.close());
|
||||
}
|
||||
```
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue