summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJuan Julián Merelo Guervós <jjmerelo@gmail.com>2020-05-15 14:51:15 +0200
committerGitHub <noreply@github.com>2020-05-15 08:51:15 -0400
commitf2e431c2b07135c0deab442a60f267324882d0b8 (patch)
tree0d355ad1fabab09e55c56dd718bbc8f3ad6d908e
parent750a3413a0db067a83697f8e8059a2bc69bd11c6 (diff)
shorten example (#5448)
-rw-r--r--std/ws/README.md5
1 files changed, 1 insertions, 4 deletions
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();