Skip to content
This repository was archived by the owner on Dec 20, 2024. It is now read-only.

Commit 3b2743f

Browse files
committed
fix dfget panic
Signed-off-by: yunfeiyangbuaa <[email protected]>
1 parent 7dd9e88 commit 3b2743f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

dfget/core/core.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -299,7 +299,7 @@ func reportMetrics(cfg *config.Config, supernodeAPI api.SupernodeAPI, downloadTi
299299
if err != nil {
300300
logrus.Errorf("failed to report metrics to supernode %s: %v", node, err)
301301
}
302-
if resp.IsSuccess() {
302+
if resp != nil && resp.IsSuccess() {
303303
return
304304
}
305305
}

0 commit comments

Comments
 (0)