public function close($destroy = false)
    {
        if ($this->getIsActive()) {
            if (Reaction::isDebug()) {
                //Reaction::info('Session closed');
            }
            return $destroy || $this->isEmpty() ? $this->destroySession() : $this->writeSession();
        }
        $this->_isActive = false;
        return \Reaction\Promise\resolve(true);
    }