mirror of
https://github.com/denoland/deno.git
synced 2024-11-22 15:06:54 -05:00
shorten example (#5448)
This commit is contained in:
parent
750a3413a0
commit
f2e431c2b0
1 changed files with 1 additions and 4 deletions
|
@ -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();
|
||||
|
|
Loading…
Reference in a new issue