Describe the bug
When running the WebTransport server code as posted in the article, at line const stream = await h3Server.sessionStream("/socket.io/");, I get the following error:
Run the server code (including the WebTransport server) included at the bottom of the article linked above.
Expected behavior
Should work as described in article.
Platform:
Device: MacBook
OS: MacOS 14.2.1
Additional context
The problem stems from the fact that h3Server.sessionStream(...) is called before h3Server.startServer().
sessionStream tries to access transportInt, but transportInt is only initialized at startServer().
To resolve this, h3Server.startServer(); should be placed before the async block in the example.
Location Website Socket.IO with WebTransport
Describe the bug When running the WebTransport server code as posted in the article, at line
const stream = await h3Server.sessionStream("/socket.io/");
, I get the following error:To Reproduce
Run the server code (including the WebTransport server) included at the bottom of the article linked above.
Expected behavior Should work as described in article.
Platform:
Additional context The problem stems from the fact that
h3Server.sessionStream(...)
is called beforeh3Server.startServer()
.sessionStream
tries to accesstransportInt
, buttransportInt
is only initialized atstartServer()
. To resolve this,h3Server.startServer();
should be placed before the async block in the example.