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

Send back "comm_close" to unidentified/closed communications #18

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions comm/base_comm.py
Original file line number Diff line number Diff line change
Expand Up @@ -284,6 +284,21 @@ def comm_msg(self, stream: ZMQStream, ident: str, msg: MessageType) -> None:
comm_id = content["comm_id"]
comm = self.get_comm(comm_id)
if comm is None:
try:
from comm import create_comm

closed_comm = create_comm(
comm_id=comm_id,
primary=False,
target_name=None,
)
closed_comm.close()
Copy link
Author

Choose a reason for hiding this comment

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

We should have some metadata sent back associated with comm_close so we are able to identify the source.

except Exception:
logger.error(
"""Could not send comm_close for a closed comm to reply
for incoming communication""",
exc_info=True,
)
return

try:
Expand Down