Permalink
Commits on Nov 15, 2011
  1. @mranney

    Changes for v0.7.0.

    mranney committed Nov 15, 2011
  2. @mranney

    Bump version.

    mranney committed Nov 15, 2011
  3. @mranney
  4. @mranney

    Merge pull request #136 from bobrik/callback-fixes

    added ability to pass undefined instead of callback
    mranney committed Nov 15, 2011
  5. @mranney

    Update TODO comment

    mranney committed Nov 15, 2011
Commits on Nov 14, 2011
  1. @mranney

    Add test for monitor command.

    mranney committed Nov 14, 2011
  2. @mranney
  3. @mranney
  4. @mranney
  5. @mranney

    Fix style.

    mranney committed Nov 14, 2011
  6. @mranney

    Merge pull request #142 from oxys/master

    After a connection error, selected db, if it was set, is not restored
    mranney committed Nov 14, 2011
  7. @mranney

    Merge pull request #146 from maks/master

    added sort example
    mranney committed Nov 14, 2011
  8. @mranney

    Merge pull request #139 from felixge/master

    Fix: Hiredis parser traps pubsub event exceptions
    mranney committed Nov 14, 2011
  9. @mranney

    Add metrics to devDependencies.

    mranney committed Nov 14, 2011
  10. @mranney
  11. @mranney
  12. @mranney
  13. @mranney

    Fix flush+error bug on server disconnect.

    Also assign a client ID to each client because stream.fd isn't available in node 0.6.
    mranney committed Nov 14, 2011
  14. @mranney

    Send quit command right away.

    The quit/pipeline bug has been fixed in Redis server for some time now.
    mranney committed Nov 14, 2011
Commits on Nov 10, 2011
  1. @mranney
  2. @mranney

    node 0.6 fixes

    mranney committed Nov 10, 2011
  3. @orls @mranney
  4. @orls @mranney

    Support new option 'connect_timeout' to stop connection retries after…

    … the number of ms specified
    orls committed with mranney Mar 13, 2011
  5. @mranney

    Merge pull request #141 from felixge/missing-self

    Fix bad reference to 'this'
    mranney committed Nov 10, 2011
Commits on Oct 27, 2011
  1. @maks

    added handy example of using sort command using code posted by linus …

    …in mranney/node_redis/#103
    maks committed Oct 27, 2011
Commits on Oct 20, 2011
  1. @jhpinson

    override select method to store selected db in client instance and re…

    …store selected db on connect
    jhpinson committed Oct 20, 2011
Commits on Oct 19, 2011
  1. @felixge

    Fix bad reference to 'this'

    felixge committed Oct 19, 2011
Commits on Oct 17, 2011
  1. @felixge

    Fix: Hiredis parser traps pubsub event exceptions

    While using this module with the hiredis parser, I noticed that exceptions
    thrown inside of subscribe/message/etc. callbacks would be reported as
    parser error exceptions, which was confusing.
    
    Example:
    
    ```
    var client = require('./index').createClient();
    
    client.on('subscribe', function() {
      throw new Error('My Error');
    });
    client.subscribe('channel');
    ```
    I would expect the above to throw 'My Error' as a simple exception, however,
    when using the hiredis parser I get:
    
    ```
    events.js:45
            throw arguments[1]; // Unhandled 'error' event
                           ^
    Error: Redis reply parser error: Error: My Error
        at RedisClient.<anonymous> (/Users/felix/code/node_redis/hiredis.js:4:9)
        at RedisClient.emit (events.js:67:17)
        at RedisClient.return_reply (/Users/felix/code/node_redis/index.js:457:22)
        at HiredisReplyParser.<anonymous> (/Users/felix/code/node_redis/index.js:220:14)
        at HiredisReplyParser.emit (events.js:64:17)
        at HiredisReplyParser.execute (/Users/felix/code/node_redis/lib/parser/hiredis.js:35:22)
        at RedisClient.on_data (/Users/felix/code/node_redis/index.js:365:27)
        at Socket.<anonymous> (/Users/felix/code/node_redis/index.js:58:14)
        ...
    ```
    
    The attached patch fixes this problem by changing the way the HiredisReplyParser
    traps exceptions, and also provides a unit test for it.
    
    Please let me know if you need any tweaks on the patch for landing it, I was
    not quite sure where to put my test / how to structure it, since most test
    cases seem to be integration tests at this point.
    
    Also, if you would prefer an integration test for this, here you go:
    
    ``` javascript
    var client = require('./index').createClient();
    var assert = require('assert');
    
    process.on('uncaughtException', function listener(err) {
      process.removeListener('uncaughtException', listener);
    
      // Drop the stack, otherwise the assert gets trapped by node
      process.nextTick(function() {
        assert.ok(!/parser error/.test(err.message), err.message);
        client.quit();
      });
    });
    
    client.on('subscribe', function() {
      throw new Error('My Error');
    });
    client.subscribe('channel');
    ```
    
    PS: If you wonder why this only affects pubsub events: This is because
    RedisClient#return_reply does exception trapping differently for events than
    it does for callbacks.
    
    See: https://github.com/mranney/node_redis/blob/3e95c55a0301104c9cd6451d71fa5527b7797792/index.js#L431
    Vs: https://github.com/mranney/node_redis/blob/3e95c55a0301104c9cd6451d71fa5527b7797792/index.js#L447
    felixge committed Oct 17, 2011
Commits on Oct 15, 2011
  1. @bobrik

    added test for optional callbacks

    bobrik committed Oct 15, 2011
Commits on Oct 2, 2011
  1. @bobrik
Commits on Aug 11, 2011
  1. @mranney

    Fix for [GH-127]

    Re-initialize the reply parser for every new connection.  If a connection is terminated,
    the parser could be left in a bad state.  After the auto-reconnect magic kicks in, it
    tries to reuse the old parser, which will not work.
    
    This change is visible to client programs if you depend on client.reply_parser.name being
    set immediately.  It will now only be set after a connection is established.
    
    Thanks to @jhurliman for reporting and @pietern for the fix suggestion.
    mranney committed Aug 11, 2011
Commits on Jul 31, 2011
  1. @mranney

    Revert "Fixes the case where if the quit() method is called, the clos…

    …ing variable checks are not honoured."
    
    This reverts commit 263965a.
    
    Conflicts:
    
    	index.js
    mranney committed Jul 31, 2011
  2. @mranney

    Fix and test for [GH-123]

    Passing an Array as as the last argument should expand as users
    expect.  The old behavior was to coerce the arguments into Strings,
    which did surprising things with Arrays.
    mranney committed Jul 31, 2011
Commits on Jul 30, 2011
  1. @mranney

    Merge pull request #122 from markdaws/master

    Bug when calling quit()
    mranney committed Jul 30, 2011
Commits on Jul 19, 2011
  1. Fixes the case where if the quit() method is called, the closing vari…

    …able checks are not honoured.
    Mark Dawson committed Jul 19, 2011