Skip to content

Prevent code from a panic if dns list is empty - #5252

Merged
soffokl merged 5 commits into
masterfrom
fix-panic-proxyclient-empty-dns-list
Jul 4, 2022
Merged

Prevent code from a panic if dns list is empty#5252
soffokl merged 5 commits into
masterfrom
fix-panic-proxyclient-empty-dns-list

Conversation

@andrey-mysterium

Copy link
Copy Markdown
Contributor

Signed-off-by: Andrey andreyt@mysterium.network

Signed-off-by: Andrey <andreyt@mysterium.network>

@Snawoot Snawoot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will still panic if cfg.DNS slice nil or empty.

@andrey-mysterium andrey-mysterium self-assigned this Jun 28, 2022
@codecov-commenter

codecov-commenter commented Jun 28, 2022

Copy link
Copy Markdown

Codecov Report

Merging #5252 (e02dd80) into master (3737ac8) will decrease coverage by 0.44%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master    #5252      +/-   ##
==========================================
- Coverage   38.44%   38.00%   -0.45%     
==========================================
  Files         358      361       +3     
  Lines       19561    19798     +237     
==========================================
+ Hits         7521     7524       +3     
- Misses      11302    11530     +228     
- Partials      738      744       +6     
Impacted Files Coverage Δ
services/wireguard/endpoint/proxyclient/client.go 16.43% <100.00%> (ø)
nat/traversal/pinger.go 78.29% <0.00%> (-3.49%) ⬇️
p2p/channel.go 66.06% <0.00%> (-0.73%) ⬇️
services/wireguard/endpoint/proxyclient/handler.go 0.00% <0.00%> (ø)
services/wireguard/endpoint/proxyclient/utils.go 0.00% <0.00%> (ø)
session/pingpong/invoice_tracker.go 64.34% <0.00%> (+0.55%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 3737ac8...e02dd80. Read the comment docs.

@Snawoot
Snawoot self-requested a review June 28, 2022 16:36
@@ -0,0 +1,65 @@
/*
* Copyright (C) 2018 The "MysteriumNetwork/node" Authors.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For new files, this should be set to the current date.

Suggested change
* Copyright (C) 2018 The "MysteriumNetwork/node" Authors.
* Copyright (C) 2022 The "MysteriumNetwork/node" Authors.

@soffokl
soffokl merged commit 8569a6f into master Jul 4, 2022
@soffokl
soffokl deleted the fix-panic-proxyclient-empty-dns-list branch July 4, 2022 03:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants