Closed ibc closed 8 months ago
NOTE: In tests above I'm doing this change to avoid more open handlers when a test file completes:
diff --git a/node/src/Channel.ts b/node/src/Channel.ts
index 7e1c71961..abb2f0468 100644
--- a/node/src/Channel.ts
+++ b/node/src/Channel.ts
@@ -227,16 +227,6 @@ export class Channel extends EnhancedEventEmitter {
this.#producerSocket.removeAllListeners('end');
this.#producerSocket.removeAllListeners('error');
this.#producerSocket.on('error', () => {});
-
- // Destroy the socket after a while to allow pending incoming messages.
- setTimeout(() => {
- try {
- this.#producerSocket.destroy();
- } catch (error) {}
- try {
- this.#consumerSocket.destroy();
- } catch (error) {}
- }, 200);
}
NOTE: In tests above I'm doing this change to avoid more open handlers when a test file completes
I strongly dislike timeouts like that. They are not reliable and will definitely fail at some point.
NOTE: In tests above I'm doing this change to avoid more open handlers when a test file completes
I strongly dislike timeouts like that. They are not reliable and will definitely fail at some point.
Yes. It was the only one in the code.
Here some issues in Node tests:
PRODUCER_PAUSE
channel request: https://github.com/versatica/mediasoup/actions/runs/7448459449/job/20262892577?pr=1305[ ]
npm run test:node -- --testPathPattern test-ActiveSpeakerObserver
fails with:[ ]
npm run test:node -- --testPathPattern "test-PipeTransport.ts"
fails with:Probably many similar ones if we run each test file separately.
NOTE: Yes, I added
--detectOpenHandles
tojest
command, but it should work fine.