Skip to content

Commit

Permalink
postgres: use PgStream::receive over PgStream::read to handle errors
Browse files Browse the repository at this point in the history
 * PgStream::read should probably be named better; maybe PgStream::raw_receive

Fixes #203
  • Loading branch information
mehcode committed Mar 31, 2020
1 parent bbbc181 commit d3eb9c7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sqlx-core/src/postgres/executor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit d3eb9c7

Please sign in to comment.