mirror of
https://github.com/launchbadge/sqlx
synced 2024-11-10 14:34:19 +00:00
postgres: use PgStream::receive over PgStream::read to handle errors
* PgStream::read should probably be named better; maybe PgStream::raw_receive Fixes #203
This commit is contained in:
parent
bbbc1811ce
commit
d3eb9c7800
1 changed files with 1 additions and 1 deletions
|
@ -167,7 +167,7 @@ impl PgConnection {
|
|||
if !self.cache_statement_id.contains_key(query) {
|
||||
// wait for `ParseComplete` on the stream or the
|
||||
// error before we cache the statement
|
||||
match self.stream.read().await? {
|
||||
match self.stream.receive().await? {
|
||||
Message::ParseComplete => {
|
||||
self.cache_statement_id.insert(query.into(), statement);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue