Also, it looks like that avoiding the use of a connection pool doesn't 
trigger the issue. The following code works fine, without any error

class StreamOmplusEvents {

  implicit val system = ActorSystem()
  implicit val materializer = ActorMaterializer()
  implicit val timeout = Timeout(10.seconds)
  import system.dispatcher

  val request = HttpRequest(
    uri = "/200"
  )

  val flow = Http(system).outgoingConnectionHttps("httpstatuses.com")

  val source = Source.single(request)
    .via(flow)
    .map(_.discardEntityBytes())

  val sourceProcessed = source.runWith(Sink.ignore)

  val systemTerminatedFuture = sourceProcessed.flatMap { _ =>
    Http().shutdownAllConnectionPools().flatMap { _ =>
      materializer.shutdown()
      system.terminate()
    }
  }

  Await.result(systemTerminatedFuture, Duration.Inf)
}


On Tuesday, 8 November 2016 11:26:15 UTC-5, Sami Dalouche wrote:
>
> *Simplest code to reproduce:*
>
>
> class StreamOmplusEvents {
>
>   implicit val system = ActorSystem()
>   implicit val materializer = ActorMaterializer()
>   implicit val timeout = Timeout(10.seconds)
>   import system.dispatcher
>
>   val request = HttpRequest(
>     uri = "https://httpstatuses.com/200";
>   )
>
>   val future = Http(system)
>     .singleRequest(request)
>     .map(_.discardEntityBytes())
>
>   val systemTerminatedFuture = future.flatMap { _ =>
>     Http().shutdownAllConnectionPools().flatMap { _ =>
>       materializer.shutdown()
>       Thread.sleep(3000)
>       system.terminate()
>     }
>   }
>
>   Await.result(systemTerminatedFuture, Duration.Inf)
> }
>
>
>
>
>
> Error I get :
>
> 2016-11-08 16:17:06,386 [default-akka.actor.default-dispatcher-2] ERROR 
> akka.actor.ActorSystemImpl - Outgoing request stream error
> akka.stream.AbruptTerminationException: Processor actor 
> [Actor[akka://default/user/StreamSupervisor-1/flow-0-0-unknown-operation#-901476425]]
>  terminated abruptly
>
>
> Now, replace "https" by "http", and there is no error message.
>
>
> Is there anything I am doing wrong?
>
>
> Regards,
>
> Sami
>
>
>

-- 
>>>>>>>>>>      Read the docs: http://akka.io/docs/
>>>>>>>>>>      Check the FAQ: 
>>>>>>>>>> http://doc.akka.io/docs/akka/current/additional/faq.html
>>>>>>>>>>      Search the archives: https://groups.google.com/group/akka-user
--- 
You received this message because you are subscribed to the Google Groups "Akka 
User List" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to akka-user+unsubscr...@googlegroups.com.
To post to this group, send email to akka-user@googlegroups.com.
Visit this group at https://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.

Reply via email to