Fix write_copy_in not being awaited in simple query

This commit is contained in:
luaneko 2025-01-12 03:35:40 +11:00
parent c2ff6b4359
commit d959a80678
Signed by: luaneko
GPG Key ID: 406809B8763FF07A

View File

@ -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; ; ) {