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

Conversation

dby-tmwctw
Copy link

Explanation of Motivation

Currently, sending communications to closed comm is a no-op. This caused sender to be unable to determine whether the backend hangs or the comm is closed, directly causing the bug described here: jupyter-widgets/ipywidgets#3833. We noticed that similar case in comm_open requests would cause it to send back comm_closed: https://jupyter-client.readthedocs.io/en/latest/messaging.html#opening-a-comm, hence we propose this PR to do the same for comm_msg.

@dby-tmwctw dby-tmwctw changed the title Track closed comms and send back "comm_close" when further communication is received Send back "comm_close" to unidentified/closed communications Oct 5, 2023
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.

@blink1073
Copy link
Contributor

Hi @dby-tmwctw, I'm just catching up on this repo, is PR ready to be merged? Does jupyter-widgets/ipywidgets#3833 depend on this PR, or the other way around, or are they independent?

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