-
-
Notifications
You must be signed in to change notification settings - Fork 1k
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
write binding tests and cleanup #808
Conversation
reconbot
commented
May 15, 2016
•
edited
Loading
edited
- Fix bug where write callback was being called multiple times when write operations blocked
- [windows] refactored write code to be less complex
- added arduino required integration tests
@@ -364,7 +364,7 @@ The `buffer` parameter accepts a [`Buffer` ](http://nodejs.org/api/buffer.html) | |||
|
|||
**_callback (optional)_** | |||
|
|||
Called once the write operation returns. The callback should be a function that looks like: `function (error, bytesWritten) { ... }` | |||
Called once the write operation returns. The callback should be a function that looks like: `function (error) { ... }` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've removed the bytes written argument from the callback as it was usually a lie because the callback was called over and over and reported on each write. It should always match the length of the bytes you gave it to write. It's possible to put this back but not easy and not useful?
You can test this branch by changing your package.json to include |
4d38b39
to
a8451c3
Compare
- Fix bug where write callback was being called multiple times when write operations blocked - [windows] refactored write code to be less complex - [unix] refactored write code to be less complex - added arduino required integration tests
- Fix bug where write callback was being called multiple times when write operations blocked - [windows] refactored write code to be less complex - [unix] refactored write code to be less complex - added arduino required integration tests