diff options
author | Matthias P. Braendli <matthias.braendli@mpb.li> | 2019-11-18 10:58:09 +0100 |
---|---|---|
committer | Matthias P. Braendli <matthias.braendli@mpb.li> | 2019-11-18 10:58:09 +0100 |
commit | bd2711937d9a4d8e8b63db1ccbc8f3633323da6d (patch) | |
tree | 7112e370af53f4cbe626384a43eb59470cf14658 /src/StatsPublish.cpp | |
parent | aafa06fa15f1ef274fef2df9e939323ed61e670e (diff) | |
download | ODR-AudioEnc-bd2711937d9a4d8e8b63db1ccbc8f3633323da6d.tar.gz ODR-AudioEnc-bd2711937d9a4d8e8b63db1ccbc8f3633323da6d.tar.bz2 ODR-AudioEnc-bd2711937d9a4d8e8b63db1ccbc8f3633323da6d.zip |
Fix StatsPublisher socket leak
Diffstat (limited to 'src/StatsPublish.cpp')
-rw-r--r-- | src/StatsPublish.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/StatsPublish.cpp b/src/StatsPublish.cpp index 0bad833..cdb32cb 100644 --- a/src/StatsPublish.cpp +++ b/src/StatsPublish.cpp @@ -51,6 +51,13 @@ StatsPublisher::StatsPublisher(const string& socket_path) : } } +StatsPublisher::~StatsPublisher() +{ + if (m_sock != -1) { + close(m_sock); + } +} + void StatsPublisher::update_audio_levels(int16_t audiolevel_left, int16_t audiolevel_right) { m_audio_left = audiolevel_left; |