@stoprocent/bleno 0.11.3 → 0.11.4
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/lib/hci-socket/hci.js
CHANGED
|
@@ -655,11 +655,16 @@ class Hci extends EventEmitter {
|
|
|
655
655
|
}
|
|
656
656
|
|
|
657
657
|
onSocketError (error) {
|
|
658
|
-
debug(
|
|
659
|
-
|
|
660
|
-
if (error
|
|
658
|
+
debug(`onSocketError: ${error.message}`);
|
|
659
|
+
// Handle Socket Error
|
|
660
|
+
if ('syscall' in error && error['syscall'] === 'socket creation failed') {
|
|
661
|
+
this.emit('stateChange', 'unsupported');
|
|
662
|
+
}
|
|
663
|
+
// Permisions
|
|
664
|
+
else if (error.code === 'EPERM') {
|
|
661
665
|
this.emit('stateChange', 'unauthorized');
|
|
662
|
-
}
|
|
666
|
+
}
|
|
667
|
+
else if (error.message === 'Network is down') {
|
|
663
668
|
// no-op
|
|
664
669
|
}
|
|
665
670
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stoprocent/bleno",
|
|
3
|
-
"version": "0.11.
|
|
3
|
+
"version": "0.11.4",
|
|
4
4
|
"description": "A Node.js module for implementing BLE (Bluetooth Low Energy) peripherals",
|
|
5
5
|
"main": "./index.js",
|
|
6
6
|
"types": "./index.d.ts",
|
|
@@ -69,7 +69,7 @@
|
|
|
69
69
|
"node-gyp-build": "^4.8.4"
|
|
70
70
|
},
|
|
71
71
|
"optionalDependencies": {
|
|
72
|
-
"@stoprocent/bluetooth-hci-socket": "^2.2.
|
|
72
|
+
"@stoprocent/bluetooth-hci-socket": "^2.2.3"
|
|
73
73
|
},
|
|
74
74
|
"publishConfig": {
|
|
75
75
|
"access": "public"
|
|
Binary file
|
|
Binary file
|
|
Binary file
|