Skip to content

Conversation

@lundibundi
Copy link
Member

When you made connect but connection was not established yet cli would fail on call and event commands with exception.
Not sure about message in new error so feel free to suggest another one.

When you made connect but connection was not established yet
cli would fail on call and event commands with exception.
Add error message Connection in progress.
@lundibundi lundibundi self-assigned this Jun 5, 2017
@lundibundi lundibundi requested a review from belochub June 5, 2017 10:24
}

call(interfaceName, methodName, args, callback) {
if (!this.cli.client) return callback(new Error('Not connected'));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@lundibundi
What do you say about removing redundant indentation by leaving line 91 as it was, and just adding this:

if (!this.cli.connection) return callback(new Error('Connection in progress'));

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@belochub it doesn't fit, does it?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@lundibundi, it doesn't fit where?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@belochub done.

Copy link
Member

@belochub belochub left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

belochub pushed a commit that referenced this pull request Jun 8, 2017
When you made connect but connection was not established yet
cli would fail on call and event commands with exception.
Add error message Connection in progress.

PR-URL: #210
Reviewed-By: Alexey Orlenko <eaglexrlnk@gmail.com>
Reviewed-By: Mykola Bilochub <nbelochub@gmail.com>
@belochub
Copy link
Member

belochub commented Jun 8, 2017

Landed in 6cb62a0.

@belochub belochub closed this Jun 8, 2017
@belochub belochub deleted the fix-cli-conn-in-progress branch June 8, 2017 07:30
belochub pushed a commit that referenced this pull request Jan 22, 2018
When you made connect but connection was not established yet
cli would fail on call and event commands with exception.
Add error message Connection in progress.

PR-URL: #210
Reviewed-By: Alexey Orlenko <eaglexrlnk@gmail.com>
Reviewed-By: Mykola Bilochub <nbelochub@gmail.com>
belochub pushed a commit that referenced this pull request Jan 22, 2018
When you made connect but connection was not established yet
cli would fail on call and event commands with exception.
Add error message Connection in progress.

PR-URL: #210
Reviewed-By: Alexey Orlenko <eaglexrlnk@gmail.com>
Reviewed-By: Mykola Bilochub <nbelochub@gmail.com>
@belochub belochub mentioned this pull request Jan 22, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants