usb 1.9.1 → 1.9.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +5 -0
- package/package.json +1 -1
- package/prebuilds/android-arm/node.napi.armv7.node +0 -0
- package/prebuilds/android-arm64/node.napi.armv8.node +0 -0
- package/prebuilds/darwin-x64+arm64/node.napi.node +0 -0
- package/prebuilds/linux-arm/node.napi.armv6.node +0 -0
- package/prebuilds/linux-arm/node.napi.armv7.node +0 -0
- package/prebuilds/linux-arm64/node.napi.armv8.node +0 -0
- package/prebuilds/linux-ia32/node.napi.node +0 -0
- package/prebuilds/linux-x64/node.napi.glibc.node +0 -0
- package/prebuilds/linux-x64/node.napi.musl.node +0 -0
- package/prebuilds/win32-ia32/node.napi.node +0 -0
- package/prebuilds/win32-x64/node.napi.node +0 -0
- package/src/device.cc +6 -6
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [1.9.2] - 2021-12-05
|
|
4
|
+
|
|
5
|
+
### Fixed
|
|
6
|
+
- Fixed exit delay and hang by moving queue start/stop to device open/close - [`460`](https://github.com/node-usb/node-usb/pull/460) ([MikeColeGuru](https://github.com/MikeColeGuru))
|
|
7
|
+
|
|
3
8
|
## [1.9.1] - 2021-11-14
|
|
4
9
|
|
|
5
10
|
### Fixed
|
package/package.json
CHANGED
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/src/device.cc
CHANGED
|
@@ -19,18 +19,12 @@ Device::Device(const Napi::CallbackInfo & info) : Napi::ObjectWrap<Device>(info)
|
|
|
19
19
|
device = info[0].As<Napi::External<libusb_device>>().Data();
|
|
20
20
|
libusb_ref_device(device);
|
|
21
21
|
byPtr.insert(std::make_pair(device, this));
|
|
22
|
-
#ifndef USE_POLL
|
|
23
|
-
completionQueue.start(info.Env());
|
|
24
|
-
#endif
|
|
25
22
|
DEBUG_LOG("Created device %p", this);
|
|
26
23
|
Constructor(info);
|
|
27
24
|
}
|
|
28
25
|
|
|
29
26
|
Device::~Device(){
|
|
30
27
|
DEBUG_LOG("Freed device %p", this);
|
|
31
|
-
#ifndef USE_POLL
|
|
32
|
-
completionQueue.stop();
|
|
33
|
-
#endif
|
|
34
28
|
byPtr.erase(device);
|
|
35
29
|
libusb_close(device_handle);
|
|
36
30
|
libusb_unref_device(device);
|
|
@@ -194,6 +188,9 @@ Napi::Value Device::Open(const Napi::CallbackInfo& info) {
|
|
|
194
188
|
ENTER_METHOD(Device, 0);
|
|
195
189
|
if (!self->device_handle){
|
|
196
190
|
CHECK_USB(libusb_open(self->device, &self->device_handle));
|
|
191
|
+
#ifndef USE_POLL
|
|
192
|
+
completionQueue.start(info.Env());
|
|
193
|
+
#endif
|
|
197
194
|
}
|
|
198
195
|
return env.Undefined();
|
|
199
196
|
}
|
|
@@ -203,6 +200,9 @@ Napi::Value Device::Close(const Napi::CallbackInfo& info) {
|
|
|
203
200
|
if (self->canClose()){
|
|
204
201
|
libusb_close(self->device_handle);
|
|
205
202
|
self->device_handle = NULL;
|
|
203
|
+
#ifndef USE_POLL
|
|
204
|
+
completionQueue.stop();
|
|
205
|
+
#endif
|
|
206
206
|
}else{
|
|
207
207
|
THROW_ERROR("Can't close device with a pending request");
|
|
208
208
|
}
|