fix the redis connection issue with pub/sub (better impl)