Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Typo in error message #189

Merged
merged 2 commits into from
Apr 2, 2015
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions lib/client.js
Original file line number Diff line number Diff line change
Expand Up @@ -249,12 +249,12 @@ Client.prototype.createTopics = function (topics, isAsync, cb) {
function attemptCreateTopics (topics, cb) {
var operation = retry.operation({ minTimeout: 200, maxTimeout: 2000 });
operation.attempt(function(currentAttempt) {
debug('craete topics currentAttempt', currentAttempt);
debug('create topics currentAttempt', currentAttempt);
self.loadMetadataForTopics(topics, function (err, resp) {
if (resp) {
var topicMetadata = resp[1].metadata;
var created = Object.keys(topicMetadata).length === topics.length;
if (!created) err = new Error('Topic creation pendding');
if (!created) err = new Error('Topic creation pending');
}
if (operation.retry(err)) {
return;
Expand All @@ -267,7 +267,7 @@ Client.prototype.createTopics = function (topics, isAsync, cb) {

if (!topicsNotExists.length) return cb(null, 'All created');

debug('craete topic by sending metadata request');
debug('create topic by sending metadata request');
attemptCreateTopics(topicsNotExists, cb);
});
};
Expand Down