Skip to content

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

Description

@stheine

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?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions