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
Updated closed connection bug #2012
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm so sorry this took 6 months to review. I think the current WIP state of the PR meant it never got looked at.
I've made a few comments in case you're interested in following this up. Otherwise perhaps we should close it out.
message.target = next(iter(self.active_connections)) | ||
#message.target = next(iter(self.active_connections)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think these are duplicate lines?
message.target = next(iter(self.active_connections)) | |
#message.target = next(iter(self.active_connections)) |
message.target = open_connections[0] | ||
else: | ||
# Handle the case where no open connections are available | ||
message.target = None # or raise an appropriate exception |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should probably raise here
# Handle the case where no open connections are available | ||
message.target = None # or raise an appropriate exception | ||
# When a connection is closed, remove it from active_connections | ||
if connection in self.active_connections: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure where this connection
variable is being created.
The issue is regarding closed connection ,the issue is whenever there is a connection closed it shows none , so what I have done is I've made it iterate through all open connections it at all no one is free then it shows null