Skip to content

Commit

Permalink
Better error logging on USB error, ignore disconnectWebSocket is WS i…
Browse files Browse the repository at this point in the history
…s not yet available
  • Loading branch information
nisargjhaveri committed Sep 2, 2024
1 parent 491e628 commit c1f0f80
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/client/RemoteAdbDevice.ts
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,10 @@ export class RemoteAdbDevice extends EventEmitter {
}

private disconnectWebSocket = async (emit: boolean) => {
if (!this.ws) {
return;
}

this.ws.onclose = undefined;
this.ws.close();
logger.log(this.backend.serial, `WebSocket closed`);
Expand Down

0 comments on commit c1f0f80

Please sign in to comment.