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:
Jon Shallow committed 2018-04-04 18:39:12 +01:00
1 parent 864ae6df8c
commit 5ecc164caa
1 file changed
+4
+4
View File
@@ -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