From f2e431c2b07135c0deab442a60f267324882d0b8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juan=20Juli=C3=A1n=20Merelo=20Guerv=C3=B3s?= Date: Fri, 15 May 2020 14:51:15 +0200 Subject: shorten example (#5448) --- std/ws/README.md | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'std') diff --git a/std/ws/README.md b/std/ws/README.md index e4d924df6..c166a5fb6 100644 --- a/std/ws/README.md +++ b/std/ws/README.md @@ -102,10 +102,7 @@ try { while (true) { await Deno.stdout.write(encode("> ")); const line = await tpr.readLine(); - if (line === null) { - break; - } - if (line === "close") { + if (line === null || line === "close") { break; } else if (line === "ping") { await sock.ping(); -- cgit v1.2.3