Skip to content

Instantly share code, notes, and snippets.

@technoweenie
Created September 20, 2010 19:03
Show Gist options
  • Select an option

  • Save technoweenie/588446 to your computer and use it in GitHub Desktop.

Select an option

Save technoweenie/588446 to your computer and use it in GitHub Desktop.
Queueing SELECT for next server connection.
Queueing FLUSHDB for next server connection.
Queueing QUIT for next server connection.
Stream connected
Sending offline command: SELECT
send command: *2
$6
SELECT
$2
15
Sending offline command: FLUSHDB
send command: *1
$7
FLUSHDB
Sending offline command: QUIT
send command: *1
$4
QUIT
Redis connection is gone.
lets try that with an open connection
Queueing SELECT for next server connection.
Stream connected
Sending offline command: SELECT
send command: *2
$6
SELECT
$2
15
on_data: +OK
INCOMING!
no callback for reply: OK
send command: *1
$7
FLUSHDB
send command: *1
$4
QUIT
Redis connection is gone.
redis = require('../vendor/node_redis')
redis.debug_mode = true
client = redis.createClient()
client.select(15)
client.flushdb()
client.quit()
setTimeout ->
# wait until first client quits
console.log("lets try that with an open connection")
client = redis.createClient()
client.select(15)
setTimeout ->
# let client 2 connect and send SELECT
client.flushdb()
client.quit()
, 500
, 500
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment