usb 1.9.0 → 1.9.1

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 CHANGED
@@ -1,5 +1,10 @@
1
1
  # Changelog
2
2
 
3
+ ## [1.9.1] - 2021-11-14
4
+
5
+ ### Fixed
6
+ - Reverted fix for exit delay fixing a segfault issue it introduced - [`456`](https://github.com/node-usb/node-usb/pull/456) ([Rob Moran](https://github.com/thegecko))
7
+
3
8
  ## [1.9.0] - 2021-11-08
4
9
 
5
10
  ### Changed
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "usb",
3
3
  "description": "Library to access USB devices",
4
- "version": "1.9.0",
4
+ "version": "1.9.1",
5
5
  "engines": {
6
6
  "node": ">=10.16.0"
7
7
  },
Binary file
Binary file
Binary file
package/src/device.cc CHANGED
@@ -21,8 +21,6 @@ Device::Device(const Napi::CallbackInfo & info) : Napi::ObjectWrap<Device>(info)
21
21
  byPtr.insert(std::make_pair(device, this));
22
22
  #ifndef USE_POLL
23
23
  completionQueue.start(info.Env());
24
- // Unref threadsafe function immediately to avoid delay in program exit
25
- completionQueue.unref(info.Env());
26
24
  #endif
27
25
  DEBUG_LOG("Created device %p", this);
28
26
  Constructor(info);
@@ -30,6 +28,9 @@ Device::Device(const Napi::CallbackInfo & info) : Napi::ObjectWrap<Device>(info)
30
28
 
31
29
  Device::~Device(){
32
30
  DEBUG_LOG("Freed device %p", this);
31
+ #ifndef USE_POLL
32
+ completionQueue.stop();
33
+ #endif
33
34
  byPtr.erase(device);
34
35
  libusb_close(device_handle);
35
36
  libusb_unref_device(device);