-
Notifications
You must be signed in to change notification settings - Fork 114
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Describe the bug
See the PR description of #1616
To Reproduce
The issue can be reproduced with the example in this repository, by modifying packages/example/src/client.ts:
import {Http2SessionManager} from "@connectrpc/connect-node";
const m = new Http2SessionManager("https://localhost:8443", {}, {
rejectUnauthorized: false,
});
if (await m.connect() != "idle") {
throw new Error();
}
if ((m.s.t !== "ready")) {
throw new Error();
}
for (;;) {
console.log("verify...");
if (await m.s.verify() !== true) {
throw new Error();
}
await new Promise(resolve => setTimeout(resolve, 250));
}$ npx tsx --trace-warnings src/client.ts
verify...
verify...
verify...
verify...
verify...
verify...
verify...
verify...
verify...
verify...
(node:47224) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 error listeners added to [ClientHttp2Session]. MaxListeners is 10. Use emitter.setMaxListeners() to increase limit
at genericNodeError (node:internal/errors:985:15)
at wrappedFn (node:internal/errors:539:14)
at _addListener (node:events:581:17)
at ClientHttp2Session.addListener (node:events:599:10)
at ClientHttp2Session.once (node:events:643:8)
at file:///Users/ts/Downloads/connect-es-ttyniwa/packages/connect-node/dist/esm/http2-session-manager.js:385:22
at new Promise (<anonymous>)
at Object.verify (file:///Users/ts/Downloads/connect-es-ttyniwa/packages/connect-node/dist/esm/http2-session-manager.js:379:20)
at <anonymous> (/Users/ts/Downloads/connect-es-ttyniwa/packages/example/src/t.ts:26:17)
verify...
Environment (please complete the following information):
- @connectrpc/connect-node version: 2.1.0
- Node.js version: v24.5.0
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working