code: async def restart_stream(self):
          
          await self.response.release()
          await asyncio.sleep(self._error_timeout)
          await self.connect()
  
          logger.info("Reconnected to the stream")
          self._reconnecting = False
          return {'stream_restart': True}
docs: Restart the stream on error