If adapter is IP and QoS is Low, delete observe list.
Change-Id: I232321d82ec2991da791587e0275c20fcc91c912
Signed-off-by: Jaehong Jo <jaehong.jo@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/12037
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Jaewook Jung <jw0213.jung@samsung.com>
Reviewed-by: Ashok Babu Channa <ashok.channa@samsung.com>
OCStackResult JniOcResource::cancelObserve(JNIEnv* env, QualityOfService qos)
{
- if (QualityOfService::HighQos != qos)
+ // In Low case, after delete the callback and send empty message when client receive the notify.
+ // But TCP does not support EMPTY message.
+ if ((CT_ADAPTER_IP & connectivityType()) && QualityOfService::HighQos != qos)
{
this->m_onObserveManager.removeAllListeners(env);
}