-
-
Notifications
You must be signed in to change notification settings - Fork 34.2k
Closed
Labels
quicIssues and PRs related to the QUIC implementation / HTTP/3.Issues and PRs related to the QUIC implementation / HTTP/3.
Description
- Version: v16.0.0-pre
- Platform: Linux 4.19.0-12-cloud-amd64 deps: update openssl to 1.0.1j #1 SMP Debian 4.19.152-1 (2020-10-18) x86_64 GNU/Linux
- Subsystem:
What steps will reproduce the bug?
const socket = net.createQuicSocket({ endpoint: { port: 555 } });
socket
.on("session", (session) => {
console.time("close");
session.on("close", () => {
console.timeEnd("close");
console.log("close but why?", session.idleTimeout);
// Output:
});
})
.listen({
alpn: "tunnel",
key: fs.readFileSync(process.env.TLS_KEY_PATH, "utf8"),
cert: fs.readFileSync(process.env.TLS_CERT_PATH, "utf8"),
ca: fs.readFileSync(process.env.TLS_CA_PATH, "utf8"),
});
socket
.connect({
address: "127.0.0.1",
port: 555,
alpn: "tunnel",
})
.then((session) => {
setInterval(() => session.ping(), 100);
session.openStream().then((stream) => {
// Send data after 15 seconds
setTimeout(() => {
stream.write("hi");
}, 15 * 1000);
});
});How often does it reproduce? Is there a required condition?
Always
What is the expected behavior?
session.ping() should reset idle timeout as said in docs
https://nodejs.org/api/quic.html#quic_quicsession_ping
but it does not reset timeout, session still ends after 10 seconds
What do you see instead?
node:internal/quic/core:2136
throw new ERR_INVALID_STATE(
^
Error [ERR_INVALID_STATE]: Invalid state: QuicClientSession is already destroyed
at new NodeError (node:internal/errors:278:15)
at QuicClientSession.ping (node:internal/quic/core:2136:13)
at Timeout._onTimeout (/home/debian/localport-server/test.js:34:31)
at listOnTimeout (node:internal/timers:556:17)
at processTimers (node:internal/timers:499:7) {
code: 'ERR_INVALID_STATE'
}
Additional information
Metadata
Metadata
Assignees
Labels
quicIssues and PRs related to the QUIC implementation / HTTP/3.Issues and PRs related to the QUIC implementation / HTTP/3.