diff options
-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); } |