mirror of
https://github.com/yhirose/cpp-httplib.git
synced 2026-10-17 10:59:39 +00:00
Fix #2340
This commit is contained in:
1 parent
fbec2a3466
commit
094bf112bb
3 files changed
+59
-1
No files matched your search
@@ -3261,11 +3261,18 @@ private:
|
||||
msg.id = value;
|
||||
} else if (field == "retry") {
|
||||
// Parse retry interval in milliseconds
|
||||
#ifdef CPPHTTPLIB_NO_EXCEPTIONS
|
||||
{
|
||||
std::istringstream iss(value);
|
||||
iss >> retry_ms;
|
||||
}
|
||||
#else
|
||||
try {
|
||||
retry_ms = std::stoi(value);
|
||||
} catch (...) {
|
||||
// Invalid retry value, ignore
|
||||
}
|
||||
#endif
|
||||
}
|
||||
// Unknown fields are ignored per SSE spec
|
||||
|
||||
|
||||
Reference in new issue
Block a user