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

Updated closed connection bug #2012

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

Conversation

yashmonk123
Copy link

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

Copy link
Member

@jacobtomlinson jacobtomlinson left a 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.

Comment on lines 183 to +184
message.target = next(iter(self.active_connections))
#message.target = next(iter(self.active_connections))
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 these are duplicate lines?

Suggested change
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
Copy link
Member

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:
Copy link
Member

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.

@jacobtomlinson jacobtomlinson mentioned this pull request Apr 25, 2024
1 task
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.

None yet

2 participants