Skip to content

Turn SHOULD into MUST for close/terminate messages handling? #422

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

Closed
tidoust opened this issue Apr 14, 2017 · 4 comments
Closed

Turn SHOULD into MUST for close/terminate messages handling? #422

tidoust opened this issue Apr 14, 2017 · 4 comments

Comments

@tidoust
Copy link
Member

tidoust commented Apr 14, 2017

As I'm reviewing tests prepared by @tomoyukilabs for close/terminate on the receiving side, there are two SHOULD in the Presentation API that now strike me as odd:

  1. "If the user agent receives a signal from the destination browsing context that a PresentationConnection S is to be closed, it SHOULD close the presentation connection S with closed or wentaway as closeReason and an empty closeMessage", in section 6.5
  2. "When a receiving user agent is to send a termination confirmation for a presentation P, and that confirmation was received by a controlling user agent, the controlling user agent SHOULD run the following steps", in section 6.5.8

Are there good reasons for these not to be MUST clauses? With SHOULD, it means a conforming implementation can reasonably ignore "close" and "terminate" messages it receives from the other end. By contrast, in Web socket, the user agent MUST close the connection if it receives a closing handshake from the other side.

Chrome seems to honour these messages. I haven't checked Mozilla's implementation but I suspect that's the case as well.

I get it we cannot guarantee that these messages reach the other side, but if they do, why ignore them?

@markafoltz
Copy link
Contributor

Yes, this is an oversight and we should update the spec to reflect implementation.

@tomoyukilabs
Copy link
Contributor

FYI: As far as I have tested on Chrome Canary for Mac and Firefox Nightly for Android,

  • Regarding 1., Both Chrome and Firefox close the presentation connection with closed as reason.
  • Regarding 2.,
    • Chrome closes the presentation connection with error as reason and Remove route as message.
    • Firefox terminates the presentation connection.

@markafoltz
Copy link
Contributor

PR #425 should address the spec issue. @tomoyukilabs, behavior #2 would be a bug and I suspect is an artifact of how we discard the offscreen presentation.

@tomoyukilabs
Copy link
Contributor

@mfoltzgoogle Thanks. I leave the test to check terminating a presentation as it is.

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

No branches or pull requests

3 participants