diff --git a/HISTORY b/HISTORY index c1a305d..014d94b 100644 --- a/HISTORY +++ b/HISTORY @@ -1,4 +1,7 @@ +Version 6.06 2019-12-26 + * bugfixed: fdfs_storaged can't quit normally + Version 6.05 2019-12-25 * fdfs_trackerd and fdfs_storaged print the server version in usage. you can execute fdfs_trackerd or fdfs_storaged without parameters diff --git a/storage/fdfs_storaged.c b/storage/fdfs_storaged.c index f721aa8..d55b7cf 100644 --- a/storage/fdfs_storaged.c +++ b/storage/fdfs_storaged.c @@ -325,7 +325,6 @@ int main(int argc, char *argv[]) tracker_report_destroy(); storage_service_destroy(); storage_sync_destroy(); - storage_func_destroy(); if (g_if_use_trunk_file) { @@ -333,6 +332,7 @@ int main(int argc, char *argv[]) storage_trunk_destroy(); } + storage_func_destroy(); delete_pid_file(pidFilename); logInfo("exit normally.\n"); log_destroy(); diff --git a/storage/storage_sync.c b/storage/storage_sync.c index 7e578d0..6aaf6e0 100644 --- a/storage/storage_sync.c +++ b/storage/storage_sync.c @@ -2997,7 +2997,10 @@ static void* storage_sync_thread_entrance(void* arg) 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, " \ "storage_reader_init fail, errno=%d, " \