mirror of
https://github.com/obgm/libcoap.git
synced 2026-11-12 11:40:39 +03:00
Merge pull request #235 from mrdeep1/observe-con
src/resource.c: Non Confirmable observe requests not getting out if CON pending
This commit is contained in:
1 file changed
+7
-2
+7
-2
@@ -742,9 +742,14 @@ coap_notify_observers(coap_context_t *context, coap_resource_t *r) {
|
||||
|
||||
LL_FOREACH(r->subscribers, obs) {
|
||||
if (r->dirty == 0 && obs->dirty == 0)
|
||||
/* running this resource due to partiallydirty, but this observation's notification was already enqueued */
|
||||
/*
|
||||
* running this resource due to partiallydirty, but this observation's
|
||||
* notification was already enqueued
|
||||
*/
|
||||
continue;
|
||||
if (obs->session->con_active >= COAP_DEFAULT_NSTART)
|
||||
if (obs->session->con_active >= COAP_DEFAULT_NSTART &&
|
||||
((r->flags & COAP_RESOURCE_FLAGS_NOTIFY_CON) ||
|
||||
(obs->non_cnt >= COAP_OBS_MAX_NON)))
|
||||
continue;
|
||||
|
||||
coap_tid_t tid = COAP_INVALID_TID;
|
||||
|
||||
Reference in new issue
Block a user