void task_finish_clean_up(struct fast_task_info *pTask) { StorageClientInfo *pClientInfo; pClientInfo = (StorageClientInfo *)pTask->arg; if (pClientInfo->clean_func != NULL) { pClientInfo->clean_func(pTask); } ioevent_detach(&pTask->thread_data->ev_puller, pTask->event.fd); close(pTask->event.fd); pTask->event.fd = -1; if (pTask->event.timer.expires > 0) { fast_timer_remove(&pTask->thread_data->timer, &pTask->event.timer); pTask->event.timer.expires = 0; } memset(pTask->arg, 0, sizeof(StorageClientInfo)); free_queue_push(pTask); __sync_fetch_and_sub(&g_storage_stat.connection.current_count, 1); ++g_stat_change_count; }
void task_finish_clean_up(struct fast_task_info *pTask) { StorageClientInfo *pClientInfo; pClientInfo = (StorageClientInfo *)pTask->arg; if (pClientInfo->clean_func != NULL) { pClientInfo->clean_func(pTask); } ioevent_detach(&pTask->thread_data->ev_puller, pTask->event.fd); close(pTask->event.fd); pTask->event.fd = -1; if (pTask->event.timer.expires > 0) { fast_timer_remove(&pTask->thread_data->timer, &pTask->event.timer); pTask->event.timer.expires = 0; } memset(pTask->arg, 0, sizeof(StorageClientInfo)); free_queue_push(pTask); }
void task_finish_clean_up(struct fast_task_info *pTask) { TrackerClientInfo *pClientInfo; pClientInfo = (TrackerClientInfo *)pTask->arg; if (pTask->finish_callback != NULL) { pTask->finish_callback(pTask); pTask->finish_callback = NULL; } if (pClientInfo->pGroup != NULL) { if (pClientInfo->pStorage != NULL) { tracker_mem_offline_store_server(pClientInfo->pGroup, \ pClientInfo->pStorage); } } ioevent_detach(&pTask->thread_data->ev_puller, pTask->event.fd); close(pTask->event.fd); pTask->event.fd = -1; if (pTask->event.timer.expires > 0) { fast_timer_remove(&pTask->thread_data->timer, &pTask->event.timer); pTask->event.timer.expires = 0; } memset(pTask->arg, 0, sizeof(TrackerClientInfo)); free_queue_push(pTask); __sync_fetch_and_sub(&g_connection_stat.current_count, 1); }