Skip to content

Commit

Permalink
Merge pull request #45 from technoweenie/redis_compat_issue
Browse files Browse the repository at this point in the history
Defaulting the port & host to resolve an incompatibility issue with node-...
  • Loading branch information
steelThread committed Mar 23, 2015
2 parents ae0fe16 + 78d0ab8 commit 148c073
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/index.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ exports.version = '0.1.11'
# database - Integer of the Redis database to select.
#
# Returns a Connection instance.
exports.connect = (options) ->
new exports.Connection options || {}
exports.connect = (options = {}) ->
new exports.Connection options

EventEmitter = require('events').EventEmitter

Expand Down Expand Up @@ -318,7 +318,10 @@ class Worker extends EventEmitter
name

connectToRedis = (options) ->
redis = require('redis').createClient options.port, options.host
redis = require('redis').createClient(
options.port || 6379,
options.host || '127.0.0.1'
)
redis.auth options.password if options.password?
redis

Expand Down

0 comments on commit 148c073

Please sign in to comment.