1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-12-23 07:44:48 -05:00

shorten example (#5448)

This commit is contained in:
Juan Julián Merelo Guervós 2020-05-15 14:51:15 +02:00 committed by GitHub
parent 750a3413a0
commit f2e431c2b0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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();