How should a frontend SSE/fetch streaming loop enforce timeouts to avoid hanging forever?