1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 17:17:45 +00:00

LibGemini: Do not loop in Gemini::Job in case of error

Previously, the job was shutdown only on a deferred invoke while there
was still data to be read. This meant that the read callback would get
called again and again, and, potentially throw the error again and again

This patch introoduces a failed state for the protocol parser and
returns early from the read callback if it has already failed
This commit is contained in:
Arda Cinar 2023-01-13 20:28:45 +03:00 committed by Andreas Kling
parent 083802d41a
commit ba9fa59355
2 changed files with 8 additions and 0 deletions

View file

@ -46,6 +46,7 @@ protected:
InStatus,
InBody,
Finished,
Failed,
};
GeminiRequest m_request;