Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

don't check if reverse is taken in the local machine #1171

Merged
merged 2 commits into from
Nov 19, 2020

Conversation

rberrelleza
Copy link
Member

Fixes #1170

Proposed changes

  • don't check if port is taken for the case of reverse forwards, since it's a valid scenario.

Signed-off-by: Ramiro Berrelleza <rberrelleza@gmail.com>
@codecov
Copy link

codecov bot commented Nov 18, 2020

Codecov Report

Merging #1171 (93ac043) into master (2557bc0) will increase coverage by 0.02%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1171      +/-   ##
==========================================
+ Coverage   34.55%   34.57%   +0.02%     
==========================================
  Files          65       65              
  Lines        5438     5440       +2     
==========================================
+ Hits         1879     1881       +2     
  Misses       3355     3355              
  Partials      204      204              
Impacted Files Coverage Δ
pkg/ssh/manager.go 64.81% <100.00%> (+1.35%) ⬆️
pkg/ssh/reverse.go 55.00% <100.00%> (ø)

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 2557bc0...93ac043. Read the comment docs.

@@ -48,7 +48,7 @@ func NewForwardManager(ctx context.Context, sshAddr, localInterface, remoteInter
}
}

func (fm *ForwardManager) canAdd(localPort int) error {
func (fm *ForwardManager) canAdd(localPort int, checkAvailable bool) error {
Copy link
Contributor

Choose a reason for hiding this comment

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

checkAvailable is not used, doesn't it?

Copy link
Member Author

Choose a reason for hiding this comment

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

I didn't push the last commit 🤦‍♂️

Signed-off-by: Ramiro Berrelleza <rberrelleza@gmail.com>
@pchico83 pchico83 merged commit b64f4bb into master Nov 19, 2020
@pchico83 pchico83 deleted the dont-check-if-reverse-is-available branch November 19, 2020 05:57
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.

unable to reverse forward
2 participants