Commit 5742af47 authored by Jung Seungho's avatar Jung Seungho Committed by Jee Hyeok Kim

fixed interval time in keepalive resource and logic to disconnect after sign up

Change-Id: I4cbf263f6ca2bfdc2614d3678b309aaa32dfe239
Signed-off-by: default avatarJung Seungho <shonest.jung@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/19771Tested-by: default avatarjenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: default avatarYeonghun Nam <yeonghun.nam@samsung.com>
Reviewed-by: default avatarJee Hyeok Kim <jihyeok13.kim@samsung.com>
parent 80bef066
......@@ -341,6 +341,11 @@ public class DeviceServerSystem extends ServerSystem {
switch (urlPath) {
case OICConstants.ACCOUNT_FULL_URI:
ctx.writeAndFlush(msg);
ctx.close();
return;
case OICConstants.ACCOUNT_SESSION_FULL_URI:
HashMap<String, Object> payloadData = mCbor
.parsePayloadFromCbor(response.getPayload(),
......
......@@ -114,8 +114,9 @@ public class KeepAliveResource extends Resource {
checkPayloadException(Constants.REQ_PING, payloadData);
Long pingTime = Integer.valueOf(
payloadData.get(Constants.REQ_PING).toString()) * (long) 60000;
Long pingTime = (long) (Integer
.valueOf(payloadData.get(Constants.REQ_PING).toString())
* (long) 60000 * 1.1);
Long connectionTime = System.currentTimeMillis() + pingTime;
mConnectionPool.put(srcDevice, connectionTime);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment