Repository: incubator-mynewt-core Updated Branches: refs/heads/develop 133a628fd -> e62a2458c
net/oic; don't send confirmable requests over TCP-like transports. Project: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/commit/9d8c6f27 Tree: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/tree/9d8c6f27 Diff: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/diff/9d8c6f27 Branch: refs/heads/develop Commit: 9d8c6f27c3fbc2d58c2eff24cf0a6ad3039598b7 Parents: 133a628 Author: Marko Kiiskila <ma...@runtime.io> Authored: Mon Mar 27 15:21:37 2017 -0700 Committer: Marko Kiiskila <ma...@runtime.io> Committed: Mon Mar 27 15:21:37 2017 -0700 ---------------------------------------------------------------------- net/oic/src/messaging/coap/observe.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/9d8c6f27/net/oic/src/messaging/coap/observe.c ---------------------------------------------------------------------- diff --git a/net/oic/src/messaging/coap/observe.c b/net/oic/src/messaging/coap/observe.c index 4369360..a262465 100644 --- a/net/oic/src/messaging/coap/observe.c +++ b/net/oic/src/messaging/coap/observe.c @@ -278,7 +278,8 @@ coap_notify_observers(oc_resource_t *resource, coap_init_message(notification, COAP_TYPE_NON, CONTENT_2_05, 0); notification->mid = transaction->mid; - if (obs->obs_counter % COAP_OBSERVE_REFRESH_INTERVAL == 0) { + if (!oc_endpoint_use_tcp(&obs->endpoint) && + obs->obs_counter % COAP_OBSERVE_REFRESH_INTERVAL == 0) { OC_LOG_DEBUG("coap_observe_notify: forcing CON " "notification to check for client liveness\n"); notification->type = COAP_TYPE_CON;