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

moniter the clien connection #148

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

Virendrapro
Copy link

The recent enhancements to the client package significantly improve WebSocket connection management. The SendCommand function now verifies client connections before command execution, ensuring commands are only sent to active clients. Additionally, robust error handling has been implemented; if a command fails, the respective connection is removed, preventing resource leakage. Connections are closed using deferred functions to guarantee proper cleanup. These changes lead to a more reliable system, effectively managing client connections and maintaining optimal performance.

@Virendrapro Virendrapro reopened this Oct 13, 2024

type Service interface {
Copy link
Owner

Choose a reason for hiding this comment

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

Hi @Virendrapro

The code are breaking. Looks like you remove something wrong.

The new code are in the wrong file. Note that the client connection implementation is in the file https://github.com/tiagorlampert/CHAOS/blob/main/client/app/handler/handler.go#L40v

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