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

Node does not exit after server.stop() #68

Open
jaller94 opened this issue Oct 11, 2018 · 2 comments
Open

Node does not exit after server.stop() #68

jaller94 opened this issue Oct 11, 2018 · 2 comments

Comments

@jaller94
Copy link

jaller94 commented Oct 11, 2018

Code to reproduce

I am using Node v10.11.0.

const { SingleThing, Thing, WebThingServer } = require('webthing');

async function test() {
  const thing = new Thing();
  const server = new WebThingServer(new SingleThing(thing), 8000);
  console.log('starting...');
  await server.start();
  console.log('started');
  console.log('stopping...');
  server.stop();
  console.log('stopped');
}

test().catch(console.error);

After completing tests in a repository of mine Jest has to be force exited for the process to quit.

git clone [email protected]:webthings/all-webthings.git
cd all-webthings
git checkout cf92a899d376ca48411b56f04ca0c2915a41d2ba
npm test -- --detectOpenHandles

This output the following on my machine:

Ran all test suites.

Jest has detected the following 1 open handle potentially keeping Jest from exiting:

  ●  Timeout

      at Object.<anonymous> (node_modules/dnssd/lib/sleep.js:14:16)
      at Object.<anonymous> (node_modules/dnssd/lib/Advertisement.js:14:13)

Because I assume that this is an issue more related to dnssd I filed it in that repository as well: DeMille/dnssd.js#10.

@rzr
Copy link
Contributor

rzr commented Oct 12, 2018

is it present in latest release ?

@mrstegeman
Copy link
Contributor

Yes. This is an issue with the dnssd library.

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

3 participants