1
0
Fork 0
mirror of https://github.com/ossrs/srs.git synced 2025-03-09 15:49:59 +00:00

refine the max connections, compare the system ulimit max open files, error when exeed limit

This commit is contained in:
winlin 2014-07-26 15:34:45 +08:00
parent 5f7ff37e64
commit ebf9e560b1
24 changed files with 133 additions and 4 deletions

View file

@ -197,7 +197,9 @@ void SrsFastLog::error(const char* tag, int context_id, const char* fmt, ...)
va_end(ap);
// add strerror() to error msg.
size += snprintf(log_data + size, LOG_MAX_SIZE - size, "(%s)", strerror(errno));
if (errno != 0) {
size += snprintf(log_data + size, LOG_MAX_SIZE - size, "(%s)", strerror(errno));
}
write_log(fd, log_data, size, SrsLogLevel::Error);
}