Skip to content

Commit

Permalink
docs(webtransport): call startServer() earlier
Browse files Browse the repository at this point in the history
Related: #430
  • Loading branch information
darrachequesne committed Jan 17, 2024
1 parent 4030c68 commit 4a87e97
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/pages/get-started/webtransport.md
Original file line number Diff line number Diff line change
Expand Up @@ -383,6 +383,8 @@ const h3Server = new Http3Server({
privKey: key,
});

h3Server.startServer();

(async () => {
const stream = await h3Server.sessionStream("/socket.io/");
const sessionReader = stream.getReader();
Expand All @@ -395,8 +397,6 @@ const h3Server = new Http3Server({
io.engine.onWebTransportSession(value);
}
})();

h3Server.startServer();
// highlight-end
```

Expand Down

1 comment on commit 4a87e97

@vercel
Copy link

@vercel vercel bot commented on 4a87e97 Jan 17, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.