summaryrefslogtreecommitdiff
path: root/tools/deno_tcp.ts
diff options
context:
space:
mode:
authorYoshiya Hinosawa <stibium121@gmail.com>2019-07-06 23:16:03 +0900
committerRyan Dahl <ry@tinyclouds.org>2019-07-06 10:16:03 -0400
commita948f9ff541e5983bc29113d1e0f1898206f8581 (patch)
tree67e47efd88468886a8e2a50ad28cc2c75be69389 /tools/deno_tcp.ts
parent33cb79d24cf03c2c771dfa499e4cc8ee7bcee800 (diff)
io: change Reader interface (#2591)
Instead of returning { nread: number, eof: bool }, read() returns EOF | number.
Diffstat (limited to 'tools/deno_tcp.ts')
-rw-r--r--tools/deno_tcp.ts2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/deno_tcp.ts b/tools/deno_tcp.ts
index 5b61bd4cd..d744a09c1 100644
--- a/tools/deno_tcp.ts
+++ b/tools/deno_tcp.ts
@@ -13,7 +13,7 @@ async function handle(conn: Deno.Conn): Promise<void> {
try {
while (true) {
const r = await conn.read(buffer);
- if (r.eof) {
+ if (r === Deno.EOF) {
break;
}
await conn.write(response);