mirror of
https://github.com/scratchfoundation/scratch-vm.git
synced 2024-12-23 06:23:37 -05:00
Merge pull request #2043 from evhan55/bug/extensions-device-scan
Device scan discovery fix
This commit is contained in:
commit
7d7193cb29
2 changed files with 2 additions and 2 deletions
|
@ -73,7 +73,7 @@ class BLE extends JSONRPCWebSocket {
|
|||
* Close the websocket.
|
||||
*/
|
||||
disconnect () {
|
||||
if (!this._connected) return;
|
||||
if (this._ws.readyState !== this._ws.OPEN) return;
|
||||
|
||||
this._ws.close();
|
||||
this._connected = false;
|
||||
|
|
|
@ -75,7 +75,7 @@ class BT extends JSONRPCWebSocket {
|
|||
* Close the websocket.
|
||||
*/
|
||||
disconnect () {
|
||||
if (!this._connected) return;
|
||||
if (this._ws.readyState !== this._ws.OPEN) return;
|
||||
|
||||
this._ws.close();
|
||||
this._connected = false;
|
||||
|
|
Loading…
Reference in a new issue