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

Add if statement to remote.Close() call #130

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

Conversation

B3rs
Copy link

@B3rs B3rs commented Jun 25, 2018

After an error in listener.Accept() remote object can be nil.

remote, err := listener.Accept()

Calling remote.Close() in this line causes a panic.
remote.Close()

We noticed this behaviour because this error Error accepting connection from remote: accept tcp [::]:11211: accept4: too many open files causes our implementation to panic.

Since the wanted behavior is to continue the listener.Accept() loop in case of error, we should wrap this particular remote.Close() call with an if remote != nil statement

Fixes #129

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.

1 participant