Skip to content

Commit 63572dc

Browse files
committed
libsql: Open a fresh stream in HttpConnection::prepare()
The server expires idle streams in 10 seconds. Therefore, let's not even attempt to reuse the same stream for preparing a new SQL statement.
1 parent fc98e19 commit 63572dc

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

libsql/src/hrana/connection.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ where
8181
}
8282

8383
pub async fn prepare(&self, sql: &str) -> crate::Result<Statement<T>> {
84-
let stream = self.current_stream().clone();
84+
let stream = self.open_stream();
8585
Statement::new(stream, sql.to_string(), true).await
8686
}
8787
}

0 commit comments

Comments
 (0)