diff options
author | Luca Casonato <hello@lcas.dev> | 2021-07-12 19:44:42 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-07-12 19:44:42 +0200 |
commit | 51e0bfda3c5df4fa1f1b36301193038ed6aaf7bf (patch) | |
tree | f730a56750444a94fdb42e508326d61754d24e07 /cli/bench/deno_tcp_proxy.ts | |
parent | 00484d24ba93418bbdde8e42483d56e3714efaa0 (diff) |
chore(runtime): deprecate `Deno.copy` (#11369)
Diffstat (limited to 'cli/bench/deno_tcp_proxy.ts')
-rw-r--r-- | cli/bench/deno_tcp_proxy.ts | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/cli/bench/deno_tcp_proxy.ts b/cli/bench/deno_tcp_proxy.ts index bab8eac19..df74de8c4 100644 --- a/cli/bench/deno_tcp_proxy.ts +++ b/cli/bench/deno_tcp_proxy.ts @@ -1,5 +1,7 @@ // Copyright 2018-2021 the Deno authors. All rights reserved. MIT license. // Used for benchmarking Deno's tcp proxy performance. +import { copy } from "../../test_util/std/io/util.ts"; + const addr = Deno.args[0] || "127.0.0.1:4500"; const originAddr = Deno.args[1] || "127.0.0.1:4501"; @@ -14,7 +16,7 @@ async function handle(conn: Deno.Conn): Promise<void> { port: Number(originPort), }); try { - await Promise.all([Deno.copy(conn, origin), Deno.copy(origin, conn)]); + await Promise.all([copy(conn, origin), copy(origin, conn)]); } catch (e) { if ( !(e instanceof Deno.errors.BrokenPipe) && |