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

Side-effect on request() when registering multiple input-events #16

Open
stheine opened this issue Dec 30, 2018 · 1 comment
Open

Side-effect on request() when registering multiple input-events #16

stheine opened this issue Dec 30, 2018 · 1 comment

Comments

@stheine
Copy link

stheine commented Dec 30, 2018

I experience a side-effect on request() when registering multiple input-events. See the following code:

const InputEvent   = require('input-event');
const request      = require('request');

// Register the callback functions
const input0    = new InputEvent('/dev/input/event0');
const keyboard0 = new InputEvent.Keyboard(input0);

const input1    = new InputEvent('/dev/input/event1');
const keyboard1 = new InputEvent.Keyboard(input1);

console.log('start request()');
request.get('http://google.com', () => {
  console.log('received result');
});

this leads to start request(), but then it hangs and received result is not reached.

if the input1/keyboard1 lines are commented out, the request() call works as expected.

why does input-event have such side-effects? and how to avoid this?

@jampy
Copy link

jampy commented Feb 16, 2022

I am experiencing the same problem. Have you found a solution?

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