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

Fix ThreadSafeCallback context and cleanup #246

Conversation

paullouisageneau
Copy link
Contributor

This PR fixes two issues related to ThreadSafeCallback:

  • It removes the callback context, which caused segfaults due to env becoming invalid (it should fix SegFault after IceState::Failed #245). The context seems useless as callback are not expected to be bound.
  • It ensures cleanup is always called, even when the user doesn't set a closed callback, by setting dummy callbacks (fix after the close process redesign in Close without destroy #239). You can check that Jest doesn't report open handles anymore for dc1 and peer2 in p2p.test.js after running tests.

@murat-dogan
Copy link
Owner

It was on my list but I didn't have time.
Thanks @paullouisageneau

@murat-dogan murat-dogan merged commit b45ffa9 into murat-dogan:master May 6, 2024
1 check passed
@ibsusu
Copy link

ibsusu commented May 6, 2024

this works wonderfully!

@paullouisageneau
Copy link
Contributor Author

@ibsusu Great, thank you for testing!

@paullouisageneau paullouisageneau deleted the fix-threadsafecallback-context-and-cleanup branch May 7, 2024 08:34
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.

SegFault after IceState::Failed
3 participants