Skip to content

Commit

Permalink
fix: added awaits in Bun.connect calls
Browse files Browse the repository at this point in the history
  • Loading branch information
kunokareal committed Mar 22, 2024
1 parent 7111318 commit e5e6248
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docs/api/tcp.md
Expand Up @@ -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,

Expand All @@ -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,
});
Expand Down

0 comments on commit e5e6248

Please sign in to comment.