Resolves #1615: Prevent multiple hardware disconnect alerts.

This commit is contained in:
Evelyn Eastmond committed 2018-10-05 11:24:52 -04:00
1 parent c9d4620f22
commit 1efead8a26
2 files changed
+2 -2

No files matched your search

+1 -1
View File
@@ -172,7 +172,7 @@ class BLE extends JSONRPCWebSocket {
}
_sendError (/* e */) {
this.disconnect();
if (this._connected) this.disconnect();
// log.error(`BLE error: ${JSON.stringify(e)}`);
this._runtime.emit(this._runtime.constructor.PERIPHERAL_ERROR, {
message: `Scratch lost connection to`,
+1 -1
View File
@@ -115,7 +115,7 @@ class BT extends JSONRPCWebSocket {
}
_sendError (/* e */) {
this.disconnect();
if (this._connected) this.disconnect();
// log.error(`BT error: ${JSON.stringify(e)}`);
this._runtime.emit(this._runtime.constructor.PERIPHERAL_ERROR, {
message: `Scratch lost connection to`,