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
- after sending
PoisonPill connection is getting closed
Actual Behavior
after sending PoisonPill connection is not getting closed. I base that on:
- my client's callback onclose is not fired,
- 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
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
PoisonPillconnection is getting closedActual Behavior
after sending
PoisonPillconnection is not getting closed. I base that on: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