diff options
author | dimitri staessens <dimitri.staessens@ugent.be> | 2017-04-02 12:02:55 +0200 |
---|---|---|
committer | dimitri staessens <dimitri.staessens@ugent.be> | 2017-04-02 12:02:55 +0200 |
commit | 3bf32626e42ade409a32503f23ff754aaa5e17c2 (patch) | |
tree | e76e6fda1f5734ef51931be8ccb1d9e92450901e /src/irmd/irm_flow.c | |
parent | b707d032cecb0cd97f548b755e4ec2bda190e83c (diff) | |
download | ouroboros-3bf32626e42ade409a32503f23ff754aaa5e17c2.tar.gz ouroboros-3bf32626e42ade409a32503f23ff754aaa5e17c2.zip |
irmd: Fix dealloc of pending flow
Diffstat (limited to 'src/irmd/irm_flow.c')
-rw-r--r-- | src/irmd/irm_flow.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/irmd/irm_flow.c b/src/irmd/irm_flow.c index 6a99b081..7a02b01a 100644 --- a/src/irmd/irm_flow.c +++ b/src/irmd/irm_flow.c @@ -148,15 +148,18 @@ enum flow_state irm_flow_wait_state(struct irm_flow * f, assert(f); assert(state != FLOW_NULL); assert(state != FLOW_DESTROY); + assert(state != FLOW_DEALLOC_PENDING); pthread_mutex_lock(&f->state_lock); assert(f->state != FLOW_NULL); - while (!(f->state == state || f->state == FLOW_DESTROY)) + while (!(f->state == state || + f->state == FLOW_DESTROY || + f->state == FLOW_DEALLOC_PENDING)) pthread_cond_wait(&f->state_cond, &f->state_lock); - if (f->state == FLOW_DESTROY) { + if (f->state == FLOW_DESTROY || f->state == FLOW_DEALLOC_PENDING) { f->state = FLOW_NULL; pthread_cond_broadcast(&f->state_cond); } |