From d959a806780d0cfca274dfe5001b3c337ae305cc Mon Sep 17 00:00:00 2001 From: luaneko Date: Sun, 12 Jan 2025 03:35:40 +1100 Subject: [PATCH] Fix write_copy_in not being awaited in simple query --- wire.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/wire.ts b/wire.ts index 9939563..3143f99 100644 --- a/wire.ts +++ b/wire.ts @@ -1235,6 +1235,7 @@ function wire_impl( continue; case CopyOutResponse.type: + case CopyBothResponse.type: await read_copy_out(stdout), (stdout = null); continue; } @@ -1288,7 +1289,7 @@ function wire_impl( () => { log("debug", { query }, `executing simple query`); write(QueryMessage, { query }); - write_copy_in(stdin); + return write_copy_in(stdin); }, async () => { for (let chunks = [], err; ; ) {