Avoid spurious logs when suricatasc closes connection.
Use SCLogDebug for control connection EOF, and SCLogError for an error.
As Chandan Chowdhury described in redmine 3685. This makes the logging
consistent with the older `if (client->version <= UNIX_PROTO_V1)` block
about 20 lines above, and avoids polluting the logs with
`Unix socket: lost connection with client`.
do {
if (ret <= 0) {
if (ret == 0) {
- SCLogInfo("Unix socket: lost connection with client");
+ SCLogDebug("Unix socket: lost connection with client");
} else {
- SCLogInfo("Unix socket: error on recv() from client: %s",
+ SCLogError(SC_ERR_SOCKET, "Unix socket: error on recv() from client: %s",
strerror(errno));
}
UnixCommandClose(this, client->fd);