Commit c0b274e
Address review: bound actions, lock-safe crash-time reads
- RegisterAction: pop on size() > Maximum so it truly retains 50 (was
>=, capping at 49); matches AddServerWarning and the PR description.
- ComputeServerWarnings: try_to_lock messageMutex instead of a blocking
lock_guard. The crashing thread may already hold it (crashed inside
AddServerWarning/RegisterAction); a blocking acquire would hang crash
reporting. Return empty if it can't be acquired.
- Replace OBS_API::getOBSLogGeneral() (returned a mutable deque ref that
RequestOBSLog drained with no synchronization, racing node_obs_log())
with snapshotOBSLogGeneral(): copies and clears logReport.general
under logMutex via try_to_lock. RequestOBSLog now consumes the
snapshot, reverse-iterating to keep the newest-first ordering.
- Include <algorithm> explicitly (std::transform was relying on a
transitive include).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>1 parent 8886ac5 commit c0b274e
3 files changed
Lines changed: 24 additions & 12 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2048 | 2048 | | |
2049 | 2049 | | |
2050 | 2050 | | |
2051 | | - | |
| 2051 | + | |
2052 | 2052 | | |
2053 | | - | |
| 2053 | + | |
| 2054 | + | |
| 2055 | + | |
| 2056 | + | |
| 2057 | + | |
| 2058 | + | |
| 2059 | + | |
2054 | 2060 | | |
2055 | 2061 | | |
2056 | 2062 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
120 | 120 | | |
121 | 121 | | |
122 | 122 | | |
123 | | - | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
124 | 127 | | |
125 | 128 | | |
126 | 129 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| 22 | + | |
22 | 23 | | |
23 | 24 | | |
24 | 25 | | |
| |||
1029 | 1030 | | |
1030 | 1031 | | |
1031 | 1032 | | |
1032 | | - | |
1033 | | - | |
1034 | | - | |
1035 | | - | |
1036 | | - | |
1037 | | - | |
1038 | | - | |
| 1033 | + | |
| 1034 | + | |
| 1035 | + | |
| 1036 | + | |
1039 | 1037 | | |
1040 | 1038 | | |
1041 | 1039 | | |
| |||
1064 | 1062 | | |
1065 | 1063 | | |
1066 | 1064 | | |
1067 | | - | |
| 1065 | + | |
| 1066 | + | |
| 1067 | + | |
| 1068 | + | |
| 1069 | + | |
| 1070 | + | |
1068 | 1071 | | |
1069 | 1072 | | |
1070 | 1073 | | |
| |||
1243 | 1246 | | |
1244 | 1247 | | |
1245 | 1248 | | |
1246 | | - | |
| 1249 | + | |
1247 | 1250 | | |
1248 | 1251 | | |
1249 | 1252 | | |
| |||
0 commit comments