diff options
author | Matthias P. Braendli <matthias.braendli@mpb.li> | 2014-05-14 21:14:35 +0200 |
---|---|---|
committer | Matthias P. Braendli <matthias.braendli@mpb.li> | 2014-05-14 21:14:35 +0200 |
commit | 95345a8913b41fa0c27bf1ba76d1b4f488345598 (patch) | |
tree | 53fa2e64320f0bc9b6b363b98ebd7752177ddafa /src/StatsServer.cpp | |
parent | 8a0848faf7fad8ec8e5482830ac5f28442e12b50 (diff) | |
download | dabmux-95345a8913b41fa0c27bf1ba76d1b4f488345598.tar.gz dabmux-95345a8913b41fa0c27bf1ba76d1b4f488345598.tar.bz2 dabmux-95345a8913b41fa0c27bf1ba76d1b4f488345598.zip |
Correct error handling in StatsServer
Diffstat (limited to 'src/StatsServer.cpp')
-rw-r--r-- | src/StatsServer.cpp | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/src/StatsServer.cpp b/src/StatsServer.cpp index 38c4607..676c832 100644 --- a/src/StatsServer.cpp +++ b/src/StatsServer.cpp @@ -299,16 +299,13 @@ void StatsServer::serverThread() else { int len = snprintf(buffer, 256, "Invalid command\n"); - n = write(accepted_sock, buffer, len); - if (n < 0) { - etiLog.level(warn) << "Error writing to Stats Server socket " << - strerror(errno); - } - close(accepted_sock); - continue; } + if (n < 0) { + etiLog.level(warn) << "Error writing to Stats Server socket " << + strerror(errno); + } close(accepted_sock); } |