public function shutdown($priorityName = null)
    {
        if ($priorityName === null) {
            foreach ($this->streams as $stream) {
                if (is_resource($stream)) {
                    fclose($stream);
                }
            }
        } elseif (isset($this->streams[$priorityName]) && is_resource($this->streams[$priorityName])) {
            fclose($this->streams[$priorityName]);
        }

        return $this;
    }