[akka-user] Re: Problem detecting Websocket failure

2017-02-21 Thread johannes . rudolph
Hi, you are applying the `alsoTo` clause to the wrong side of the connection. You need to put it on the Sink-side. The way you have written it, the `alsoTo` clause waits for your `Source.actorRef` to close the connection. Try using singleWebSocketRequest(...,

[akka-user] Re: Problem detecting Websocket failure

2017-02-10 Thread Brandon Bradley
Hello! I also can't get flow.alsoTo(Sink.onComplete(...)) to trigger. The only thing that completes when the websocket closes (due to timeout) is the materialized Future[Done] from the Flow. In addition, the pattern to use for reconnection logic becomes unclear because the websocket flow is

[akka-user] Re: Problem detecting Websocket failure

2016-09-29 Thread 'Alexej Haak' via Akka User List
source .viaMat( Http().webSocketClientFlow( WebSocketRequest( host + "/console") ) )(Keep.both) .alsoTo(Sink.onComplete(_ => { self ! RestartWebsocket })) .toMat(sink)(Keep.left) .run() -- >> Read the docs: http://akka.io/docs/ >>