mirror of
https://github.com/scratchfoundation/scratch-vm.git
synced 2024-12-23 06:23:37 -05:00
Changing JSDoc slightly, again.
This commit is contained in:
parent
c30807a678
commit
2761209631
2 changed files with 8 additions and 9 deletions
|
@ -192,20 +192,19 @@ class BLE extends JSONRPCWebSocket {
|
|||
* - going out of bluetooth range
|
||||
* - being powered down
|
||||
*
|
||||
* If the extension using this BLE socket has a disconnect callback, call it,
|
||||
* and also disconnect the socket. Finally, emit an error to the runtime.
|
||||
* Disconnect the socket, and if the extension using this socket has a
|
||||
* disconnect callback, call it. Finally, emit an error to the runtime.
|
||||
*/
|
||||
handleDisconnectError (/* e */) {
|
||||
// log.error(`BLE error: ${JSON.stringify(e)}`);
|
||||
|
||||
if (!this._connected) return;
|
||||
|
||||
this.disconnect();
|
||||
|
||||
if (this._disconnectCallback) {
|
||||
this._disconnectCallback();
|
||||
}
|
||||
|
||||
this.disconnect();
|
||||
|
||||
this._runtime.emit(this._runtime.constructor.PERIPHERAL_DISCONNECT_ERROR, {
|
||||
message: `Scratch lost connection to`,
|
||||
extensionId: this._extensionId
|
||||
|
|
|
@ -135,20 +135,20 @@ class BT extends JSONRPCWebSocket {
|
|||
* - going out of bluetooth range
|
||||
* - being powered down
|
||||
*
|
||||
* If the extension using this BLE socket has a disconnect callback, call it,
|
||||
* and also disconnect the socket. Finally, emit an error to the runtime.
|
||||
* Disconnect the socket, and if the extension using this socket has a
|
||||
* disconnect callback, call it. Finally, emit an error to the runtime.
|
||||
*/
|
||||
handleDisconnectError (/* e */) {
|
||||
// log.error(`BT error: ${JSON.stringify(e)}`);
|
||||
|
||||
if (!this._connected) return;
|
||||
|
||||
this.disconnect();
|
||||
|
||||
if (this._disconnectCallback) {
|
||||
this._disconnectCallback();
|
||||
}
|
||||
|
||||
this.disconnect();
|
||||
|
||||
this._runtime.emit(this._runtime.constructor.PERIPHERAL_DISCONNECT_ERROR, {
|
||||
message: `Scratch lost connection to`,
|
||||
extensionId: this._extensionId
|
||||
|
|
Loading…
Reference in a new issue