garrows / browser-serialport

Robots in the browser. Just like node-serialport but for browser/chrome apps.
MIT License
205 stars 73 forks source link

Fix double listeners #36

Closed phated closed 9 years ago

phated commented 9 years ago

What's this PR do?

Fixes a bug where closing the serial port and reopening would double register the listener on chrome.serial.

Where should the reviewer start?

The failing test added in test/serialport-basic.js which was committed in a separate commit before the fix.

How should this be manually tested?

Run tests on just the commit that added the test to see a failing test and then with the fix to see it passing.

Any background context you want to provide?

Found this while trying to close and open a serialport multiple times and was getting double responses back.

What are the relevant tickets?

None.