Changing JSDoc slightly, again.

This commit is contained in:
Evelyn Eastmond 2019-01-16 16:00:25 -05:00
parent c30807a678
commit 2761209631
2 changed files with 8 additions and 9 deletions

View file

@ -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

View file

@ -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