Close akka-http websocket connection from server
In my scenario, a client sends "goodbye" websocket message and I need to close previously established connection at the server side. From akka-http docs : Closing connections is possible by cancelling the incoming connection Flow from your server logic (e.g. by connecting its downstream to a Sink.cancelled and its upstream to a Source.empty). It is also possible to shut down the server's socket by cancelling the IncomingConnection source connections. But it's not clear to me how to do that taking into account that Sink and Source are set once when negotiating a new connection: (get & path("ws"