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

Native Addon does not seem to terminate #41

Closed
LukasBombach opened this issue Dec 26, 2019 · 3 comments
Closed

Native Addon does not seem to terminate #41

LukasBombach opened this issue Dec 26, 2019 · 3 comments

Comments

@LukasBombach
Copy link

Hey there

if I load the compiled native node addon directly and run this little script:

const util = require("util");
const { EventEmitter } = require("events");
const NobleMac = require("./native/noble_mac").NobleMac;

util.inherits(NobleMac, EventEmitter);

const nobleMac = new NobleMac();

nobleMac.init();

console.log("done");

The node process will never terminate. If you remove the line nobleMac.init(); it will terminate right after logging done. For some reason the native process seems to keep running and I cannot find the reason nor how to terminate it.

Do you have an idea? <3

@LukasBombach
Copy link
Author

Ok it is this line

https://github.com/Timeular/noble-mac/blob/master/src/ble_manager.mm#L18

Maybe I can find a fix and open a PR

@geovie
Copy link
Collaborator

geovie commented Dec 26, 2019

@LukasBombach
Copy link
Author

OH YES

Thank you soo much! 🎉

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

No branches or pull requests

2 participants