licode icon indicating copy to clipboard operation
licode copied to clipboard

Hacky fix for delay when resolving promise

Open lodoyun opened this issue 4 years ago • 0 comments

Description

In my setup this reduces the delay of the first publisher in ErizoJS. The delay is caused by the resolution of the addMediaStream promise returned when creating a Publisher. We wait for that promise to complete in order to start the connection. In my tests that promise resolves in less than 5ms in erizoAPI but the callback from the promise in ErizoJS can often take around 5 seconds. This hacky solution greatly reduces the chances of that happening in my setup.

[] It needs and includes Unit Tests

Changes in Client or Server public APIs

[] It includes documentation for these changes in /doc.

lodoyun avatar Feb 27 '20 14:02 lodoyun