Comments (6)
Ok, I was under the impression that you need this done to verify tests in flatbuffers. If not, let's wait.
from mediasoup.
So I cannot reproduce the error. I mean, I've literally make
safeEmit()
behave asemit()
(no try/catch) and the tests succeed ¯_(ツ)_/¯@jmillan what do I need to reproduce the problem? you remember?
As said in the description, write expect(1).toBe(2)
in an even handler. The test will pass, and it should not.
from mediasoup.
We should only use safeEmit()
in internal listeners and never use it in public events. The app is free to add try/catch into its listeners.
NOTE: Same must be done in mediasoup-client and mediasoup-aiortc-client.
NOTE: Let's do this directly in flatbuffers.
from mediasoup.
NOTE: Let's do this directly in flatbuffers.
I have just discovered this issue that has always been there. Can we wait for flatbuffers
to be moved to v3
and do it then?
It will be impossible for anyone to look at the PR otherwise.
I don't find this being so urgent. We can do it as soon as flatbuffers
is merged.
from mediasoup.
So I cannot reproduce the error. I mean, I've literally make safeEmit()
behave as emit()
(no try/catch) and the tests succeed ¯_(ツ)_/¯
@jmillan what do I need to reproduce the problem? you remember?
from mediasoup.
Well, that's the thing: if I add this in the test file:
dataConsumer.on('message', (message, ppid) =>
{
// current code
expect(1).toBe(2);
});
then I see that those listeners are failing due to the new emittererror
event. The thing is that I do NOT see any other error, meaning that all the other expect()
are NOT failing!
console.log
------ dataConsumer listener error [eventName:message]: Error: expect(received).toBe(expected) // Object.is equality
Expected: 2
Received: 1
at DataConsumer.<anonymous> (node/src/tests/test-DirectTransport.ts:150:11)
at DataConsumer.<anonymous> (node/src/tests/test-DirectTransport.ts:235:12)
console.log
------ dataConsumer listener error [eventName:message]: Error: expect(received).toBe(expected) // Object.is equality
Expected: 2
Received: 1
at DataConsumer.<anonymous> (node/src/tests/test-DirectTransport.ts:150:11)
PASS node/src/tests/test-DirectTransport.ts
✓ router.createDirectTransport() succeeds (11 ms)
✓ router.createDirectTransport() with wrong arguments rejects with TypeError (26 ms)
✓ directTransport.getStats() succeeds (4 ms)
✓ directTransport.connect() succeeds (1 ms)
✓ dataProducer.send() succeeds (249 ms)
✓ dataProducer.send() with subchannels succeeds (5 ms)
✓ DirectTransport methods reject if closed (6 ms)
✓ DirectTransport emits "routerclose" if Router is closed (2 ms)
✓ DirectTransport emits "routerclose" if Worker is closed (2 ms)
Test Suites: 1 passed, 1 total
Tests: 9 passed, 9 total
Snapshots: 0 total
Time: 3.067 s
Ran all test suites matching /tests\/test-DirectTransport.ts/i.
from mediasoup.
Related Issues (20)
- Memory leak HOT 6
- Multi-thread bug when using usrsctp in N Worker threads in Rust HOT 1
- opus dtx incorrectly judged HOT 7
- Possible missing break in H264_SVC::ParseSingleNalu()
- Must join all XxxConsumer classes into a single one
- set MS_LOG_DEV_LEVEL 3, lead to build errors HOT 1
- #define MS_LOG_DEV_LEVEL 3, build error HOT 1
- SeqManager<T>::SeqLowerThan() crashes when used as compare function in abseil set or map (only in debug mode) HOT 24
- Use uint64_t for containers with RTP seq number as key
- arm64 prebuilt binaries are replacing x64 ones HOT 4
- test-PipeTransport.ts randomly fails HOT 2
- RtpPacket::SetPayloadLength get wrong payloadLength HOT 2
- Possible memory leak HOT 34
- DataConsumer::SendMessage cause onQueuedCallback* cb leak and DATACONSUMER_SEND have no response HOT 1
- FeedbackRtpTransport.cpp may have an overflow mistake HOT 9
- Worker crash when closing `WebRtcServer` if there are TCP connections active HOT 2
- Mediasoup worker died, exiting in 2 seconds... HOT 2
- [Rust] Error log “XXX closing failed on drop: Channel already closed”
- Add interface for RTC::Shared, Channel::ChannelNotifier and ChannelMessageRegistrator HOT 3
- [Rust] Transport with only audio producer results in server-side transport cc is not created. HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mediasoup.