mirror of
https://github.com/yume-chan/ya-webadb.git
synced 2025-10-05 19:42:15 +02:00
fix(stream): remove UnwrapStream
, it doesn't work
This commit is contained in:
parent
d862077c34
commit
6a18fa293b
6 changed files with 13 additions and 37 deletions
|
@ -6,8 +6,6 @@ import {
|
|||
MaybeConsumable,
|
||||
PushReadableStream,
|
||||
tryClose,
|
||||
WrapWritableStream,
|
||||
WritableStream,
|
||||
} from "@yume-chan/stream-extra";
|
||||
import type { ValueOrPromise } from "@yume-chan/struct";
|
||||
|
||||
|
@ -36,7 +34,7 @@ function nodeSocketToConnection(
|
|||
tryClose(controller);
|
||||
});
|
||||
}),
|
||||
writable: new WritableStream<Uint8Array>({
|
||||
writable: new MaybeConsumable.WritableStream<Uint8Array>({
|
||||
write: (chunk) => {
|
||||
return new Promise<void>((resolve, reject) => {
|
||||
socket.write(chunk, (err) => {
|
||||
|
@ -100,9 +98,7 @@ export class AdbServerNodeTcpConnector
|
|||
await handler({
|
||||
service: address!,
|
||||
readable: connection.readable,
|
||||
writable: new WrapWritableStream(
|
||||
connection.writable,
|
||||
).bePipedThroughFrom(new MaybeConsumable.UnwrapStream()),
|
||||
writable: connection.writable,
|
||||
get closed() {
|
||||
return connection.closed;
|
||||
},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue