Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do SSL/DTLS init on addon start instead of in DtlsClient constructor #1324

Merged
merged 1 commit into from
Oct 30, 2018

Conversation

lodoyun
Copy link
Contributor

@lodoyun lodoyun commented Oct 30, 2018

Description

The ssl init and the creation of the static certificate used in the session where being created in the DtlsSocketContext constructor and the Init static function was not thread-safe.
This PR avoids this problem by initializing those fields in the initialization of the Node Addon which is done synchronously when starting the ErizoJS process

[] It needs and includes Unit Tests

Changes in Client or Server public APIs

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

@lodoyun lodoyun changed the title Do SSL/DTLS init on addon start instead of in DtlsClient Init Do SSL/DTLS init on addon start instead of in DtlsClient constructor Oct 30, 2018
Copy link
Contributor

@jcague jcague left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! This is a much better way to initialize it.

@lodoyun lodoyun merged commit e972306 into lynckia:master Oct 30, 2018
@lodoyun lodoyun deleted the fix/DtlsInitRace branch November 22, 2018 11:42
Arri98 pushed a commit to Arri98/licode that referenced this pull request Apr 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants