protected void Dispose() { if (redisStream != null) { redisStream.CloseConnection(); redisStream = null; } if (clientSocket != null) { clientSocket.Close(); clientSocket = null; } }