fix: close device when any error occurred in the communication (#692)
This commit is contained in:
committed by
László Monda
parent
bd8a2f704f
commit
5234f85dbe
@@ -109,6 +109,7 @@ export class UhkHidDevice {
|
||||
device.read((err: any, receivedData: Array<number>) => {
|
||||
if (err) {
|
||||
this.logService.error('[UhkHidDevice] Transfer error: ', err);
|
||||
this.close();
|
||||
return reject(err);
|
||||
}
|
||||
const logString = bufferToString(receivedData);
|
||||
|
||||
Reference in New Issue
Block a user