public function removeReadStream($stream)
    {
        $key = (int) $stream;

        if (isset($this->streamsRead[$key])) {
            unset($this->streamsRead[$key]);
        }
        if (isset($this->streamsDuplex[$key]) && !isset($this->streamsWrite[$key])) {
            unset($this->streamsDuplex[$key]);
        }

        GlobalState::set('eventloop.streams.read.current', count($this->streamsRead));
        GlobalState::set('eventloop.streams.total.current', count($this->streamsDuplex));

        $this->loop->removeReadStream($stream);
    }