Don't desync the stream on error in quick_query

This commit is contained in:
Steven Fackler 2014-02-11 23:09:27 -08:00
parent 8ae9636422
commit d72c607b6d

View File

@ -654,8 +654,10 @@ impl InnerPostgresConnection {
result.push(row.move_iter().map(|opt|
opt.map(|b| str::from_utf8_owned(b).unwrap()))
.collect()),
ErrorResponse { fields } =>
return Err(PgDbError(PostgresDbError::new(fields))),
ErrorResponse { fields } => {
if_ok!(self.wait_for_ready());
return Err(PgDbError(PostgresDbError::new(fields)));
}
_ => {}
}
}