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

Fixes problem when local_port is set to zero #6

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

thechile
Copy link

If you set local_port to zero then the local port will get randomly assigned by socket but currently won't get recorded in actual_local_port.

If you are goign to start multiple instances of net-ssh-gateway at the same time then there is a chance that the next_port method could select the same local port as another instance so setting local_port=0 is safer.

If you set local_port to zero then the local port will get randomly
assigned by socket but currently won't get recorded in actual_local_port.

If you are goign to start multiple instances of net-ssh-gateway at the
same time then there is a chance that the next_port method could select
the same local port as another instance so setting local_port=0 is safer.
@@ -85,6 +85,11 @@ def active?
@active
end

# Returns the gateway host being used for the tunnel
def host?
Copy link
Collaborator

Choose a reason for hiding this comment

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

this should be just host no question mark

@bf4
Copy link

bf4 commented Jul 19, 2021

Close as stale?

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.

3 participants