@@ -183,6 +183,7 @@ func (j *job) preheat(ctx context.Context, data string) (string, error) {
183
183
log .Info ("[preheat]: preheat single seed peer" )
184
184
resp , err := j .preheatSingleSeedPeer (ctx , req , log )
185
185
if err != nil {
186
+ log .Errorf ("[preheat]: preheat single seed peer failed: %s" , err .Error ())
186
187
return "" , err
187
188
}
188
189
@@ -192,6 +193,7 @@ func (j *job) preheat(ctx context.Context, data string) (string, error) {
192
193
log .Info ("[preheat]: preheat all seed peers" )
193
194
resp , err := j .preheatAllSeedPeers (ctx , req , log )
194
195
if err != nil {
196
+ log .Errorf ("[preheat]: preheat all seed peers failed: %s" , err .Error ())
195
197
return "" , err
196
198
}
197
199
@@ -201,6 +203,7 @@ func (j *job) preheat(ctx context.Context, data string) (string, error) {
201
203
log .Info ("[preheat]: preheat all peers" )
202
204
resp , err := j .preheatAllPeers (ctx , req , log )
203
205
if err != nil {
206
+ log .Errorf ("[preheat]: preheat all peers failed: %s" , err .Error ())
204
207
return "" , err
205
208
}
206
209
@@ -210,6 +213,7 @@ func (j *job) preheat(ctx context.Context, data string) (string, error) {
210
213
log .Warnf ("[preheat]: scope is invalid %s, preheat single peer" , req .Scope )
211
214
resp , err := j .preheatSingleSeedPeer (ctx , req , log )
212
215
if err != nil {
216
+ log .Errorf ("[preheat]: preheat single seed peer failed: %s" , err .Error ())
213
217
return "" , err
214
218
}
215
219
@@ -538,7 +542,7 @@ func (j *job) selectSeedPeers(ips []string, count *uint32, percentage *uint8, lo
538
542
for _ , seedPeer := range seedPeers {
539
543
if slices .Contains (ips , seedPeer .Ip ) {
540
544
selectedSeedPeers = append (selectedSeedPeers , seedPeer )
541
- break
545
+ continue
542
546
}
543
547
}
544
548
@@ -739,7 +743,7 @@ func (j *job) selectPeers(ips []string, count *uint32, percentage *uint8, log *l
739
743
for _ , peer := range peers {
740
744
if slices .Contains (ips , peer .IP ) {
741
745
selectedPeers = append (selectedPeers , peer )
742
- break
746
+ continue
743
747
}
744
748
}
745
749
0 commit comments