mirror of
https://github.com/yhirose/cpp-httplib.git
synced 2026-11-01 15:05:42 +00:00
last_event_id() returned a reference to a string that run_event_loop() assigns on its own thread under start_async(), so a caller reading it from another thread raced the writes. The member is now guarded by a mutex and the getter returns a copy. The return type changes from const std::string & to std::string. Code that binds the result to a const reference or copies it still compiles.
1.0 MiB
1.0 MiB