Skip to content

Commit

Permalink
cli: fix crush on event reception
Browse files Browse the repository at this point in the history
PR-URL: metarhia/jstp#173
Reviewed-By: Denys Otrishko <shishugi@gmail.com>
  • Loading branch information
belochub committed May 23, 2017
1 parent 5c15dc7 commit c349e9d
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions tools/cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -198,8 +198,10 @@ commandProcessor.connect = (
state.connection = connection;
state.api = filterApiCompletions(api);
// TODO: make event registering generic
connection.on('event', (data) => {
log(`Received remote event: ${jstp.stringify(data)}`);
connection.on('event', (event) => {
log(`Received remote event '${event.remoteEventName}'` +
` in interface '${event.interfaceName}':` +
` ${jstp.stringify(event.remoteEventArgs)}`);
});
callback();
}
Expand Down

0 comments on commit c349e9d

Please sign in to comment.