Transport disconnect method (#753)

* Prevent reads from piling up

* Implement disconnect() method for all transports
This commit is contained in:
Henri Bergius
2025-08-05 22:46:23 -04:00
committed by GitHub
parent 313c4dbb71
commit 0a7b653ec8
7 changed files with 62 additions and 6 deletions
+1
View File
@@ -818,6 +818,7 @@ export class MeshDevice {
this.complete();
await this.transport.toDevice.close();
await this.transport.disconnect();
}
/**
+1
View File
@@ -15,6 +15,7 @@ export type DeviceOutput = Packet | DebugLog;
export interface Transport {
toDevice: WritableStream<Uint8Array>;
fromDevice: ReadableStream<DeviceOutput>;
disconnect(): Promise<void>;
}
export interface QueueItem {