First try with role reset (#427)

* First try with role rest

* update

* extra line

* Update src/server.rs

Co-authored-by: Lev Kokotov <levkk@users.noreply.github.com>

* Update tests/ruby/misc_spec.rb

Co-authored-by: Lev Kokotov <levkk@users.noreply.github.com>

---------

Co-authored-by: Lev Kokotov <levkk@users.noreply.github.com>
This commit is contained in:
Andrew Tanner
2023-05-05 18:31:27 -04:00
committed by GitHub
parent 389993bf3e
commit 159eb89bf0
2 changed files with 13 additions and 0 deletions

View File

@@ -963,6 +963,7 @@ impl Server {
if self.needs_cleanup {
warn!("Server returned with session state altered, discarding state");
self.query("DISCARD ALL").await?;
self.query("RESET ROLE").await?;
self.needs_cleanup = false;
}