public function stream_close()
    {
        if (!$this->handle) {
            return;
        }
        self::restorePrev();
        \fclose($this->handle);
        $this->handle = null;
        self::register();
    }