Commit 03daa02
authored
fix: small race fixes (#106)
* fix: protect providersCount with mutex to avoid race condition
prevents concurrent access to shared counter when processing providers from DHT and IPNI
* fix: respect context timeout in provider discovery loop
adds context.Done() case to select statement to honor the timeout from URL parameters (5-300 seconds)1 parent b68c284 commit 03daa02
1 file changed
+8
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
164 | 164 | | |
165 | 165 | | |
166 | 166 | | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
167 | 171 | | |
168 | 172 | | |
169 | 173 | | |
| |||
183 | 187 | | |
184 | 188 | | |
185 | 189 | | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
186 | 193 | | |
187 | 194 | | |
188 | 195 | | |
189 | 196 | | |
| 197 | + | |
190 | 198 | | |
191 | 199 | | |
192 | 200 | | |
| |||
0 commit comments