Skip to content

Commit

Permalink
shorten example (denoland#5448)
Browse files Browse the repository at this point in the history
  • Loading branch information
JJ committed May 15, 2020
1 parent 750a341 commit f2e431c
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions std/ws/README.md
Expand Up @@ -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();
Expand Down

0 comments on commit f2e431c

Please sign in to comment.