Commit d1efbd8
committed
fix(config): clone request in RoundTrip and guard clientVersion with RWMutex
Fixes two concurrent-use bugs:
- versionTransport.RoundTrip mutated the caller's request in place,
violating the http.RoundTripper contract; now clones with req.Clone().
- clientVersion was read/written without synchronisation; protected
with a sync.RWMutex (SetClientVersion holds write lock, RoundTrip
holds read lock).
Also threads SnapshotShellOhMyZsh through Config→InstallState so
PlanFromSnapshot only sets InstallOhMyZsh=true when the snapshot
actually recorded it, fixing the unconditional Oh-My-Zsh restore bug.1 parent 03fafa7 commit d1efbd8
3 files changed
Lines changed: 24 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
766 | 766 | | |
767 | 767 | | |
768 | 768 | | |
| 769 | + | |
769 | 770 | | |
770 | 771 | | |
771 | 772 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
41 | | - | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
42 | 46 | | |
43 | 47 | | |
44 | | - | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
45 | 53 | | |
46 | 54 | | |
| 55 | + | |
47 | 56 | | |
48 | 57 | | |
49 | 58 | | |
50 | | - | |
51 | | - | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
52 | 64 | | |
53 | 65 | | |
54 | 66 | | |
| |||
93 | 105 | | |
94 | 106 | | |
95 | 107 | | |
96 | | - | |
| 108 | + | |
| 109 | + | |
97 | 110 | | |
98 | 111 | | |
99 | 112 | | |
| |||
127 | 140 | | |
128 | 141 | | |
129 | 142 | | |
| 143 | + | |
130 | 144 | | |
131 | 145 | | |
132 | 146 | | |
| |||
162 | 176 | | |
163 | 177 | | |
164 | 178 | | |
| 179 | + | |
165 | 180 | | |
166 | 181 | | |
167 | 182 | | |
| |||
177 | 192 | | |
178 | 193 | | |
179 | 194 | | |
| 195 | + | |
180 | 196 | | |
181 | 197 | | |
182 | 198 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
321 | 321 | | |
322 | 322 | | |
323 | 323 | | |
324 | | - | |
325 | | - | |
| 324 | + | |
| 325 | + | |
326 | 326 | | |
327 | 327 | | |
328 | 328 | | |
| |||
0 commit comments