mirror of
https://github.com/SoftEtherVPN/SoftEtherVPN.git
synced 2024-11-23 01:49:53 +03:00
Remove last priority flag in deference to queue size checks
This commit is contained in:
parent
b536cb93f4
commit
e1bc2fd055
@ -2625,7 +2625,6 @@ void LogThread(THREAD *thread, void *param)
|
|||||||
bool flag = false;
|
bool flag = false;
|
||||||
char current_file_name[MAX_SIZE];
|
char current_file_name[MAX_SIZE];
|
||||||
char current_logfile_datename[MAX_SIZE];
|
char current_logfile_datename[MAX_SIZE];
|
||||||
bool last_priority_flag = false;
|
|
||||||
bool log_date_changed = false;
|
bool log_date_changed = false;
|
||||||
// Validate arguments
|
// Validate arguments
|
||||||
if (thread == NULL || param == NULL)
|
if (thread == NULL || param == NULL)
|
||||||
@ -2729,23 +2728,15 @@ static bool LogThreadWriteGeneral(LOG *log_object, BUF *buffer, IO **io, bool *l
|
|||||||
if (num >= LOG_ENGINE_SAVE_START_CACHE_COUNT)
|
if (num >= LOG_ENGINE_SAVE_START_CACHE_COUNT)
|
||||||
{
|
{
|
||||||
// Raise the priority
|
// Raise the priority
|
||||||
if (last_priority_flag == false)
|
Debug("LOG_THREAD: MsSetThreadPriorityRealtime\n");
|
||||||
{
|
MsSetThreadPriorityRealtime();
|
||||||
Debug("LOG_THREAD: MsSetThreadPriorityRealtime\n");
|
|
||||||
MsSetThreadPriorityRealtime();
|
|
||||||
last_priority_flag = true;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (num < (LOG_ENGINE_SAVE_START_CACHE_COUNT / 2))
|
if (num < (LOG_ENGINE_SAVE_START_CACHE_COUNT / 2))
|
||||||
{
|
{
|
||||||
// Restore the priority
|
// Restore the priority
|
||||||
if (last_priority_flag)
|
Debug("LOG_THREAD: MsSetThreadPriorityIdle\n");
|
||||||
{
|
MsSetThreadPriorityIdle();
|
||||||
Debug("LOG_THREAD: MsSetThreadPriorityIdle\n");
|
|
||||||
MsSetThreadPriorityIdle();
|
|
||||||
last_priority_flag = false;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
#endif // OS_WIN32
|
#endif // OS_WIN32
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user