bugfixed: fdfs_storaged can't quit normally

pull/484/head
YuQing 2019-12-26 21:55:22 +08:00
parent 9442384755
commit a9e593e03b
3 changed files with 8 additions and 2 deletions

View File

@ -1,4 +1,7 @@
Version 6.06 2019-12-26
* bugfixed: fdfs_storaged can't quit normally
Version 6.05 2019-12-25 Version 6.05 2019-12-25
* fdfs_trackerd and fdfs_storaged print the server version in usage. * fdfs_trackerd and fdfs_storaged print the server version in usage.
you can execute fdfs_trackerd or fdfs_storaged without parameters you can execute fdfs_trackerd or fdfs_storaged without parameters

View File

@ -325,7 +325,6 @@ int main(int argc, char *argv[])
tracker_report_destroy(); tracker_report_destroy();
storage_service_destroy(); storage_service_destroy();
storage_sync_destroy(); storage_sync_destroy();
storage_func_destroy();
if (g_if_use_trunk_file) if (g_if_use_trunk_file)
{ {
@ -333,6 +332,7 @@ int main(int argc, char *argv[])
storage_trunk_destroy(); storage_trunk_destroy();
} }
storage_func_destroy();
delete_pid_file(pidFilename); delete_pid_file(pidFilename);
logInfo("exit normally.\n"); logInfo("exit normally.\n");
log_destroy(); log_destroy();

View File

@ -2997,7 +2997,10 @@ static void* storage_sync_thread_entrance(void* arg)
continue; continue;
} }
if ((result=storage_reader_init(pStorage, pReader)) != 0) storage_reader_remove_from_list(pReader);
result = storage_reader_init(pStorage, pReader);
storage_reader_add_to_list(pReader);
if (result != 0)
{ {
logCrit("file: "__FILE__", line: %d, " \ logCrit("file: "__FILE__", line: %d, " \
"storage_reader_init fail, errno=%d, " \ "storage_reader_init fail, errno=%d, " \