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

Handling Closed Connections #2006

Closed

Conversation

Heet-09
Copy link

@Heet-09 Heet-09 commented Aug 14, 2023

Description

Instead of directly using next(iter(self.active_connections)), you should iterate through the active connections and remove any closed connections before selecting the target
This change will ensure that only open connections are considered for sending messages.
You should also make sure that when a connection is closed, it is properly removed from the active_connections dictionary. This should happen in the code where you handle connection closures.

Fixes #1933

Status

UNDER DEVELOPMENT

Type of change

  • Bug fix (non-breaking change which fixes an issue

How Has This Been Tested?

Waiting for test result

Checklist:

  • I have performed a self-review of my own code

@jacobtomlinson
Copy link
Member

Closing as duplicate of #2012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Websocket connect attempts to send message to closing connection
2 participants