Skip to content

Commit

Permalink
FIX Client handler after connection update
Browse files Browse the repository at this point in the history
Exec commands from server to the client after connection update.
  • Loading branch information
janantala committed May 5, 2015
1 parent c205881 commit eb8dd22
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion bin/iotagent-lwm2m-client.js
Original file line number Diff line number Diff line change
Expand Up @@ -164,10 +164,12 @@ function disconnect(command) {

function updateConnection(command) {
if (globalDeviceInfo) {
lwm2mClient.update(globalDeviceInfo, function(error) {
lwm2mClient.update(globalDeviceInfo, function(error, deviceInfo) {
if (error) {
clUtils.handleError(error);
} else {
globalDeviceInfo = deviceInfo;
setHandlers(deviceInfo);
console.log('\Information updated:\n--------------------------------\n');
clUtils.prompt();
}
Expand Down

0 comments on commit eb8dd22

Please sign in to comment.