mirror of
https://github.com/obgm/libcoap.git
synced 2026-11-07 18:12:55 +03:00
coap_io.c: Include coap_check_notify() in the coap_write() logic
So that the application does not need to call in in the main i/o loop
This commit is contained in:
1 parent
864ae6df8c
commit
5ecc164caa
1 file changed
+4
@@ -52,6 +52,7 @@
|
||||
#include "coap_io.h"
|
||||
#include "pdu.h"
|
||||
#include "utlist.h"
|
||||
#include "resource.h"
|
||||
|
||||
#if !defined(WITH_CONTIKI) && !defined(WITH_LWIP)
|
||||
/* define generic PKTINFO for IPv4 */
|
||||
@@ -1051,6 +1052,9 @@ coap_write(coap_context_t *ctx,
|
||||
|
||||
*num_sockets = 0;
|
||||
|
||||
/* Check to see if we need to send off any Observe requests */
|
||||
coap_check_notify(ctx);
|
||||
|
||||
if (ctx->session_timeout > 0)
|
||||
session_timeout = ctx->session_timeout * COAP_TICKS_PER_SECOND;
|
||||
else
|
||||
|
||||
Reference in new issue
Block a user