Commit 330543ea authored by Pekka Pessi's avatar Pekka Pessi

Do not throttle at termination. [FIX]

nea_server now sends NOTIFYs that terminate subscription even if the
previous NOTIFY transaction has not completed yet.

This fixes the race condition in nua_terminate() (where terminating NOTIFY
was is never sent).

darcs-hash:20051130120319-65a35-53baa4eeab80d5086a5a2835c1bac5ee948a2eaa.gz
parent 09931a6f
......@@ -1983,12 +1983,15 @@ int nea_sub_notify(nea_server_t *nes, nea_sub_t *s,
nea_event_t *ev = s->s_event;
nea_state_t substate = s->s_state;
if (s->s_pending_flush || s->s_oreq) {
if (s->s_pending_flush || (s->s_oreq && substate != nea_terminated)) {
if (ev && ev->ev_throttling > s->s_updated)
ev->ev_throttling = s->s_updated;
return 0;
}
if (s->s_oreq)
nta_outgoing_destroy(s->s_oreq), s->s_oreq = NULL;
assert(s->s_view); assert(ev);
if (!subscription_state_change && s->s_view->evv_updated == s->s_updated)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment