close redis connection when shutdown