summaryrefslogtreecommitdiffstats
path: root/CAN-binder/low-can-binding/utils/socketcan.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'CAN-binder/low-can-binding/utils/socketcan.cpp')
-rw-r--r--CAN-binder/low-can-binding/utils/socketcan.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/CAN-binder/low-can-binding/utils/socketcan.cpp b/CAN-binder/low-can-binding/utils/socketcan.cpp
index 3aa34d22..71588a6e 100644
--- a/CAN-binder/low-can-binding/utils/socketcan.cpp
+++ b/CAN-binder/low-can-binding/utils/socketcan.cpp
@@ -45,7 +45,10 @@ namespace utils
}
socketcan_t::~socketcan_t()
- {}
+ {
+ close();
+ socket_ = INVALID_SOCKET;
+ }
const struct sockaddr_can& socketcan_t::get_tx_address() const
{