Skip to content

Commit 5b09884

Browse files
authored
chore(client): replace cancel with close in async exit handling
1 parent 8cae362 commit 5b09884

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/client.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -608,7 +608,7 @@ impl Client {
608608

609609
#[inline]
610610
async fn __aexit__(&self, _exc_type: Py<PyAny>, _exc_val: Py<PyAny>, _traceback: Py<PyAny>) {
611-
self.cancel.cancel();
611+
self.close();
612612
}
613613
}
614614

@@ -780,6 +780,6 @@ impl BlockingClient {
780780
_exc_value: &Bound<'py, PyAny>,
781781
_traceback: &Bound<'py, PyAny>,
782782
) {
783-
// TODO: Implement connection closing logic if necessary.
783+
self.close();
784784
}
785785
}

0 commit comments

Comments
 (0)