mirror of
https://github.com/siemens-mobile-hacks/node-serialport-bindings-cpp.git
synced 2026-11-25 18:37:19 +00:00
Fix unhandled promise rejection when calling read on Windows.
Without this change, following error is signaled: (node:12996) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 2): TypeError: First argument must be an int
This commit is contained in:
parent
db88509f4f
commit
0b2a5e30df
1 changed files with 1 additions and 1 deletions
|
|
@ -36,7 +36,7 @@ class WindowsBinding extends BaseBinding {
|
|||
|
||||
read(buffer, offset, length) {
|
||||
return super.read(buffer, offset, length)
|
||||
.then(() => promisify(binding.read)(buffer, offset, length));
|
||||
.then(() => promisify(binding.read)(this.fd, buffer, offset, length));
|
||||
}
|
||||
|
||||
write(buffer) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue