Skip to content

Outdated doc for Websockets #6408

@note

Description

@note

Play Version (2.5.4)

API (Scala)

Operating System (MacOS 10.11)

Hello, I try to get familiar with WebSockets in Play. I am following https://www.playframework.com/documentation/2.5.x/ScalaWebSockets#closing-a-websocket. After a few hours wasted I found out that this doc is probably outdated. In current Play you close Websocket connection by closing underlying akka-stream. Would be great if you can update docs accordingly.

Probably you don't need a reproducer because I feel it's expected behavior, but just in case:

Expected Behavior

  1. after sending PoisonPill connection is getting closed

Actual Behavior

after sending PoisonPill connection is not getting closed. I base that on:

  1. my client's callback onclose is not fired,
  2. Chrome's network Tab shows WS connection as Pending

Reproducible Test Case

you can see this code at https://github.com/note/play-ws-example, here's what is essential for this case: https://github.com/note/play-ws-example/blob/master/app/controllers/WebSocketController.scala. I also included my JS code here: https://github.com/note/play-ws-example/tree/master/client

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions