You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
if (this.retrying && (retries === 0 || this.retries < retries)) {
this.retries++;
setTimeout(() => {
this.device.connect(this.options.port, this.options.address);
}, 5000);
}
else { //this line will always hit and throw exception on close.
this.retrying = false;
throw new Error(`Cannot connect to ${this.options.address}:${this.options.port}`);
}
});
when calling close on the printer object the network adapter throws the exception, causing the awaiter to fail, trying to catch the exception has proven tough, causing node to crash. simple fix is to return upon retrying === false, and only throw the exception when it is in a retrying state
The text was updated successfully, but these errors were encountered:
this.device.on("close", () => {
this.connected = false;
when calling close on the printer object the network adapter throws the exception, causing the awaiter to fail, trying to catch the exception has proven tough, causing node to crash. simple fix is to return upon retrying === false, and only throw the exception when it is in a retrying state
The text was updated successfully, but these errors were encountered: