title: Recover from dropped connection in redis pub/sub
body: <p>I am running client that is connecting to a redis db.  The client is on a WiFi connection and will drop the connection at times.  Unfortunately, when this happens, the program just keeps running without throwing any type of warning.</p>
  
  <pre><code>r = redis.StrictRedis(host=XX, password=YY...)
  ps = r.pubsub()
  ps.subscribe("12345")
  for items in ps.listen():
      if items['type'] == 'message':
         data = items['data']
  </code></pre>
  
  <p>Ideally, what I am looking for is a catch an event when the connection is lost, try and reestablish the connection, do some error correcting, then get things back up and running.  Should this be done in the python program?  Should I have an external watchdog?</p>