Less dirty servers & fix python

This commit is contained in:
Lev Kokotov
2022-02-03 18:02:50 -08:00
parent baf2852f03
commit 83daaf92d1
7 changed files with 34 additions and 0 deletions

View File

@@ -55,6 +55,7 @@ impl Client {
// TODO: perform actual auth.
// TODO: record startup parameters client sends over.
auth_ok(&mut stream).await?;
server_parameters(&mut stream).await?;
ready_for_query(&mut stream).await?;
let (read, write) = stream.into_split();
@@ -135,6 +136,10 @@ impl Client {
'X' => {
// Client closing
if server.in_transaction() {
server.query("ROLLBACK").await?;
}
return Ok(());
}