Skip to content

The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.

refactor(browser): remove unused Drop implementation for BrowserTool

Steven Enamakel420383b520bc
diff --git a/crates/openhuman-core/src/tools/impl/browser/browser.rs b/crates/openhuman-core/src/tools/impl/browser/browser.rs
index d715f75a42..a3ad05da79 100644
--- a/crates/openhuman-core/src/tools/impl/browser/browser.rs
+++ b/crates/openhuman-core/src/tools/impl/browser/browser.rs
@@ -1,8 +1,6 @@
//! Agent-facing browser backed by the TinyComputer module's browser and task members.
#[path = "browser_cleanup.rs"]
mod cleanup;
-#[path = "browser_drop.rs"]
-mod browser_drop;
#[path = "browser_pending.rs"]
mod pending;
#[path = "browser_session_pool.rs"]
diff --git a/crates/openhuman-core/src/tools/impl/browser/browser_drop.rs b/crates/openhuman-core/src/tools/impl/browser/browser_drop.rs
deleted file mode 100644
index efadaa0f72..0000000000
--- a/crates/openhuman-core/src/tools/impl/browser/browser_drop.rs
+++ /dev/null
@@ -1,21 +0,0 @@
-use super::BrowserTool;
-
-impl Drop for BrowserTool {
- fn drop(&mut self) {
- if self.thread_key.lock().ok().is_some_and(|key| key.is_some()) {
- // A later turn in this conversation reuses the module session.
- // Explicit `close` removes it; module shutdown owns final cleanup.
- return;
- }
- if let Ok(mut held) = self.session.try_lock() {
- if let Some(id) = held.take() {
- let client = self.client.clone();
- if let Ok(runtime) = tokio::runtime::Handle::try_current() {
- runtime.spawn(async move {
- let _ = client.close_session(&id).await;
- });
- }
- }
- }
- }
-}