fix(twai): make sure that can bus is shut down properly

This commit is contained in:
Yuan Yu
2025-08-14 11:43:09 +08:00
parent 13f422501d
commit c386170aad

View File

@@ -421,6 +421,7 @@ class CanBusManager:
if self.bus:
try:
self.bus.shutdown()
subprocess.run(['sudo', '-n', 'ip', 'link', 'set', self.interface, 'down'], check=True)
except Exception:
pass