Skip to content

Commit

Permalink
fix(postgres): avoid unnecessary flush in PgCopyIn::read_from
Browse files Browse the repository at this point in the history
  • Loading branch information
jwangnz committed Dec 12, 2023
1 parent 929af41 commit 91c6e66
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions sqlx-postgres/src/copy.rs
Original file line number Diff line number Diff line change
Expand Up @@ -221,10 +221,6 @@ impl<C: DerefMut<Target = PgConnection>> PgCopyIn<C> {
}

let conn: &mut PgConnection = self.conn.as_deref_mut().expect("copy_from: conn taken");

// flush any existing messages in the buffer and clear it
conn.stream.flush().await?;

loop {
let buf = conn.stream.write_buffer_mut();

Expand Down

0 comments on commit 91c6e66

Please sign in to comment.