summaryrefslogtreecommitdiff
path: root/std/ws/README.md
diff options
context:
space:
mode:
Diffstat (limited to 'std/ws/README.md')
-rw-r--r--std/ws/README.md5
1 files changed, 2 insertions, 3 deletions
diff --git a/std/ws/README.md b/std/ws/README.md
index 39bac4741..c3b3fe2c6 100644
--- a/std/ws/README.md
+++ b/std/ws/README.md
@@ -101,9 +101,8 @@ console.log(green("ws connected! (type 'close' to quit)"));
const tpr = new TextProtoReader(new BufReader(Deno.stdin));
while (true) {
await Deno.stdout.write(encode("> "));
- const [line, err] = await tpr.readLine();
- if (err) {
- console.error(red(`failed to read line from stdin: ${err}`));
+ const line = await tpr.readLine();
+ if (line === Deno.EOF) {
break;
}
if (line === "close") {