summaryrefslogtreecommitdiff
path: root/src/lbdata.cc
diff options
context:
space:
mode:
authorslioch <slioch@eng-140.vyatta.com>2009-07-24 17:37:49 -0700
committerslioch <slioch@eng-140.vyatta.com>2009-07-24 17:37:49 -0700
commitfbd1493208cad8ec72aa2bde8f28dd7f13dbaa80 (patch)
treef0df5043589ba5ecdc2a48ae968e93845f344ece /src/lbdata.cc
parentf672a6d5ca04b643a9d8583fcb8ade4da9fde6f3 (diff)
downloadvyatta-wanloadbalance-fbd1493208cad8ec72aa2bde8f28dd7f13dbaa80.tar.gz
vyatta-wanloadbalance-fbd1493208cad8ec72aa2bde8f28dd7f13dbaa80.zip
release socks on shutdown
Diffstat (limited to 'src/lbdata.cc')
-rw-r--r--src/lbdata.cc19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/lbdata.cc b/src/lbdata.cc
index 4dc8d76..a2666e7 100644
--- a/src/lbdata.cc
+++ b/src/lbdata.cc
@@ -398,3 +398,22 @@ LBTest::init()
syslog(LOG_ERR, "wan_lb: failed to bind recv sock");
}
}
+
+LBTest::~LBTest()
+{
+ if (_recv_icmp_sock != 0) {
+ close(_recv_icmp_sock);
+ _recv_icmp_sock = 0;
+ }
+
+ if (_send_raw_sock != 0) {
+ close(_send_raw_sock);
+ _send_raw_sock = 0;
+ }
+
+ if (_send_icmp_sock != 0) {
+ close(_send_icmp_sock);
+ _send_icmp_sock = 0;
+ }
+
+}