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

Fix bug and code optimization #273

Merged
merged 2 commits into from
Jul 29, 2021
Merged

Fix bug and code optimization #273

merged 2 commits into from
Jul 29, 2021

Conversation

devincd
Copy link
Contributor

@devincd devincd commented Jul 28, 2021

Signed-off-by: devincd 505259926@qq.com

If redis url is unix domain socket, will panic. The log is bellow:

WARN[0000] connecting to redis on /var/run/nutcracker/ratelimit.sock with pool size 10
panic: dial tcp: address /var/run/nutcracker/ratelimit.sock: missing port in address

Signed-off-by: devincd <505259926@qq.com>
Copy link
Member

@mattklein123 mattklein123 left a comment

Choose a reason for hiding this comment

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

Nice, thanks. One question.

/wait-any

server.httpServer.Close()
}
server.listenerMu.Unlock()
os.Exit(0)
Copy link
Member

Choose a reason for hiding this comment

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

I think we should leave the Exit(0) call after the Stop() call? Is it not needed?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yes. it is needed

Signed-off-by: devincd <505259926@qq.com>
Copy link
Member

@mattklein123 mattklein123 left a comment

Choose a reason for hiding this comment

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

Thanks!

@mattklein123 mattklein123 merged commit 73ad2b3 into envoyproxy:main Jul 29, 2021
@devincd devincd deleted the code_optimization branch July 30, 2021 01:31
timcovar pushed a commit to goatapp/ratelimit that referenced this pull request Jan 16, 2024
Signed-off-by: devincd <505259926@qq.com>
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.

2 participants