Skip to content

Commit 0b4b3ca

Browse files
committed
libsql: Fix double borrow in RawStream drop
1 parent c90ab43 commit 0b4b3ca

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

libsql/src/hrana/stream.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -445,7 +445,8 @@ where
445445
T: HttpSend,
446446
{
447447
fn drop(&mut self) {
448-
if let Some(baton) = self.baton.borrow_mut().take() {
448+
let baton = self.baton.get_mut().take();
449+
if let Some(baton) = baton {
449450
// only send a close request if stream was ever used to send the data
450451
tracing::trace!("closing client stream (baton: `{}`)", baton);
451452
let req = serde_json::to_string(&PipelineReqBody {

0 commit comments

Comments
 (0)