(&self)
| 226 | } |
| 227 | |
| 228 | async fn close(&self) -> Result<()> { |
| 229 | self.connected.store(false, Ordering::SeqCst); |
| 230 | |
| 231 | // Kill the child process |
| 232 | let mut child_guard = self.child.write().await; |
| 233 | if let Some(mut child) = child_guard.take() { |
| 234 | let _ = child.kill().await; |
| 235 | } |
| 236 | |
| 237 | Ok(()) |
| 238 | } |
| 239 | |
| 240 | fn is_connected(&self) -> bool { |
| 241 | self.connected.load(Ordering::SeqCst) |