Pass application_name to server (#73)

* Pass application_name to server

* fmt
This commit is contained in:
Lev Kokotov
2022-06-03 00:15:50 -07:00
committed by GitHub
parent 61db13f614
commit 37e3a86881
2 changed files with 10 additions and 1 deletions

View File

@@ -342,6 +342,14 @@ impl Client {
server.address()
);
// Set application_name if any.
// TODO: investigate other parameters and set them too.
if self.parameters.contains_key("application_name") {
server
.set_name(&self.parameters["application_name"])
.await?;
}
// Transaction loop. Multiple queries can be issued by the client here.
// The connection belongs to the client until the transaction is over,
// or until the client disconnects if we are in session mode.