Skip to content

'connected' event triggers before the SerialPort is opened #48

Description

@fcovas

If I run the examples/basic.js the application crashes because the serial port is not opened on the 'connected' event. Shouldn't the 'connected' event only be emitted after the SerialPort 'open' event?

Here https://github.com/ecto/duino/blob/master/lib/board.js#L28, instead of:

self.emit('connected');

do this:

self.serial.on('open', function(){
    self.emit('connected');
});

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