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

WebRTCBin.createAnswer() callback not called sporadically (promise garbage collected) #270

Open
jw-meelogic opened this issue Jun 16, 2023 · 4 comments · May be fixed by #271
Open

WebRTCBin.createAnswer() callback not called sporadically (promise garbage collected) #270

jw-meelogic opened this issue Jun 16, 2023 · 4 comments · May be fixed by #271

Comments

@jw-meelogic
Copy link

jw-meelogic commented Jun 16, 2023

Looks like the promise which is used inside the method sometimes gets garbage collected before callback is called.

reproducible with:

webRtcBin.createAnswer(answer -> {
   System.out.println("ANSWER");
});
System.gc();
@neilcsmith-net
Copy link
Member

Yes, think I can see where the problem lies there. Most of the webrrc code was donated by someone who has not contributed for some time. Few options to consider to fix. Do you want to take it on?

@jw-meelogic
Copy link
Author

See pull request

@neilcsmith-net
Copy link
Member

See pull request

Thanks. That might be the simplest way to fix this, although I have a slight concern on that implementation.

As and when we know whether there will be any further releases of this library, I'll review and/or merge.

@jw-meelogic
Copy link
Author

Extended the pull request with data channel support.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants