Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion libsql/src/hrana/connection.rs
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ where
}

pub async fn prepare(&self, sql: &str) -> crate::Result<Statement<T>> {
let stream = self.current_stream().clone();
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did the expired stream get properly cleaned up?
Is it possible to check the current stream to see if it's a live and reuse it, if it's dead open a new stream - does that improve anything?

let stream = self.open_stream();
Statement::new(stream, sql.to_string(), true).await
}
}
Expand Down
Loading