Re: [akka-user] StreamTcp exceptions handling

2015-04-14 Thread Илья Ненахов
Do I need to dynamicaly change source to close connection? If I do it in client updateSink Success case there is no effect. 2015-04-10 11:59 GMT+03:00 Akka Team : > Hi, > > On Tue, Apr 7, 2015 at 3:57 PM, zergood wrote: > >> Is there an api for closing client connection? >> > > The API is there,

Re: [akka-user] StreamTcp exceptions handling

2015-04-07 Thread zergood
Is there an api for closing client connection? вторник, 7 апреля 2015 г., 16:40:46 UTC+3 пользователь Akka Team написал: > > > > On Tue, Apr 7, 2015 at 3:38 PM, zergood > > wrote: > >> Here is my client code: >> def downloadUpdate(address: InetSocketAddress, outputFilePath:String)( >> implicit

Re: [akka-user] StreamTcp exceptions handling

2015-04-07 Thread Akka Team
On Tue, Apr 7, 2015 at 3:38 PM, zergood wrote: > Here is my client code: > def downloadUpdate(address: InetSocketAddress, outputFilePath:String)( > implicit system: ActorSystem):Unit = { > import scala.concurrent.duration._ > implicit val actorStreamMaterializer = ActorFlowMaterializer(

Re: [akka-user] StreamTcp exceptions handling

2015-04-07 Thread zergood
Here is my client code: def downloadUpdate(address: InetSocketAddress, outputFilePath:String)( implicit system: ActorSystem):Unit = { import scala.concurrent.duration._ implicit val actorStreamMaterializer = ActorFlowMaterializer() val connection = StreamTcp(system).outgoingConnection

Re: [akka-user] StreamTcp exceptions handling

2015-04-07 Thread Endre Varga
On Tue, Apr 7, 2015 at 1:47 PM, zergood wrote: > Thank you for your answer. > > But If I use onCompleteSink after connection flow, future will not be > completed successfully however data will be downloaded by client. > The only reason for that could be that the client does not close the connect

Re: [akka-user] StreamTcp exceptions handling

2015-04-07 Thread zergood
Thank you for your answer. But If I use onCompleteSink after connection flow, future will not be completed successfully however data will be downloaded by client. If client is failed while downloading there are still no exceptions on server side. Could you provide me some links from documenta

Re: [akka-user] StreamTcp exceptions handling

2015-04-07 Thread Akka Team
Hi, The connection flow will publish the errors, but you feed them to a BackholeSink. Also, your OnCompleteSink is probably at the wrong place -- it will not tell you anything about whether the TCP connection have sent everything fine or not. As such, you will close the binding before you have sen

[akka-user] StreamTcp exceptions handling

2015-04-06 Thread zergood
Hello! My server side: def update: Iterator[ByteString] lazy val binding = StreamTcp(system).bind(address, idleTimeout = 20.seconds) def start(): Future[Unit] = { val firstCompleted = Promise[Unit]() val foreachConnection = ForeachSink[IncomingConnection] { connection =>