Transport disconnect method (#753)
* Prevent reads from piling up * Implement disconnect() method for all transports
This commit is contained in:
@@ -818,6 +818,7 @@ export class MeshDevice {
|
||||
|
||||
this.complete();
|
||||
await this.transport.toDevice.close();
|
||||
await this.transport.disconnect();
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -15,6 +15,7 @@ export type DeviceOutput = Packet | DebugLog;
|
||||
export interface Transport {
|
||||
toDevice: WritableStream<Uint8Array>;
|
||||
fromDevice: ReadableStream<DeviceOutput>;
|
||||
disconnect(): Promise<void>;
|
||||
}
|
||||
|
||||
export interface QueueItem {
|
||||
|
||||
Reference in New Issue
Block a user