summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordimitri staessens <dimitri.staessens@ugent.be>2017-10-04 07:27:25 +0000
committerSander Vrijders <sander.vrijders@ugent.be>2017-10-04 07:27:25 +0000
commit7dcacfbc94386e155650aaaa1a8f56cfb6fc53f9 (patch)
treee1f90f33b93a720e1a0b9cf4168508db358ba61d
parentb3879c020ebf038a07aed20ee91ea38f21b7bd98 (diff)
parent79d9fd60237b16f40eb96fc8ed6eba7fff506636 (diff)
downloadouroboros-7dcacfbc94386e155650aaaa1a8f56cfb6fc53f9.tar.gz
ouroboros-7dcacfbc94386e155650aaaa1a8f56cfb6fc53f9.zip
Merged in dstaesse/ouroboros/be-flow-cleanup (pull request #622)
irmd: Don't destroy flows before IPCPs
-rw-r--r--src/irmd/main.c23
1 files changed, 1 insertions, 22 deletions
diff --git a/src/irmd/main.c b/src/irmd/main.c
index 64e4d459..84c55e93 100644
--- a/src/irmd/main.c
+++ b/src/irmd/main.c
@@ -1703,29 +1703,8 @@ void * irm_sanitize(void * o)
if (clock_gettime(CLOCK_MONOTONIC, &now) < 0)
log_warn("Failed to get time.");
- if (irmd_get_state() != IRMD_RUNNING) {
- /* Clean up all flows first to kill mainloops */
- pthread_rwlock_wrlock(&irmd.flows_lock);
- list_for_each_safe(p, h, &irmd.irm_flows) {
- struct irm_flow * f =
- list_entry(p, struct irm_flow, next);
- list_del(&f->next);
- irm_flow_set_state(f, FLOW_NULL);
- clear_irm_flow(f);
- irm_flow_destroy(f);
- }
- pthread_rwlock_unlock(&irmd.flows_lock);
- pthread_rwlock_wrlock(&irmd.reg_lock);
- /* Clean up api entries as well */
- list_for_each_safe(p, h, &irmd.api_table) {
- struct api_entry * e =
- list_entry(p, struct api_entry, next);
- list_del(&e->next);
- api_entry_destroy(e);
- }
- pthread_rwlock_unlock(&irmd.reg_lock);
+ if (irmd_get_state() != IRMD_RUNNING)
return (void *) 0;
- }
pthread_rwlock_wrlock(&irmd.reg_lock);