From e5e624818872df57810484b00e6415fb16acbf96 Mon Sep 17 00:00:00 2001 From: kunoka <163348146+kunokareal@users.noreply.github.com> Date: Sat, 23 Mar 2024 00:05:56 +0300 Subject: [PATCH] fix: added `awaits` in `Bun.connect` calls --- docs/api/tcp.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/api/tcp.md b/docs/api/tcp.md index b12ac74c194f67..e3a1bc8c0e538e 100644 --- a/docs/api/tcp.md +++ b/docs/api/tcp.md @@ -115,7 +115,7 @@ Use `Bun.connect` to connect to a TCP server. Specify the server to connect to w ```ts // The client -const socket = Bun.connect({ +const socket = await Bun.connect({ hostname: "localhost", port: 8080, @@ -138,7 +138,7 @@ To require TLS, specify `tls: true`. ```ts // The client -const socket = Bun.connect({ +const socket = await Bun.connect({ // ... config tls: true, });