summaryrefslogtreecommitdiff
path: root/std/examples
diff options
context:
space:
mode:
Diffstat (limited to 'std/examples')
-rw-r--r--std/examples/chat/server.ts2
-rw-r--r--std/examples/chat/server_test.ts2
2 files changed, 2 insertions, 2 deletions
diff --git a/std/examples/chat/server.ts b/std/examples/chat/server.ts
index 3c968e44e..08aede05b 100644
--- a/std/examples/chat/server.ts
+++ b/std/examples/chat/server.ts
@@ -8,7 +8,7 @@ import {
const clients = new Map<number, WebSocket>();
let clientId = 0;
-async function dispatch(msg: string): Promise<void> {
+function dispatch(msg: string): void {
for (const client of clients.values()) {
client.send(msg);
}
diff --git a/std/examples/chat/server_test.ts b/std/examples/chat/server_test.ts
index 899eb1b32..0d21b3787 100644
--- a/std/examples/chat/server_test.ts
+++ b/std/examples/chat/server_test.ts
@@ -18,7 +18,7 @@ async function startServer(): Promise<Deno.Process> {
const r = new TextProtoReader(new BufReader(server.stdout));
const s = await r.readLine();
assert(s !== Deno.EOF && s.includes("chat server starting"));
- } catch {
+ } catch (err) {
server.stdout!.close();
server.close();
}