gpt4 book ai didi

akka-stream - akka http 客户端 system.shutdown() 使用 https 时产生 "Outgoing request stream error (akka.stream.AbruptTerminationException)"

转载 作者:行者123 更新时间:2023-12-04 14:55:33 27 4
gpt4 key购买 nike

嗨,以下代码按预期工作。

implicit val system = ActorSystem()
implicit val materializer = ActorMaterializer()

import system.dispatcher

val request = HttpRequest(uri = "http://www.google.com")

Http.get(system).singleRequest(request).map(_.entity.dataBytes.runWith(Sink.ignore))
.onComplete { _ =>
println("shutting down actor system...")
system.terminate()
}

但是,如果我更改 http://www.google.comhttps://www.google.com像下面这样:
implicit val system = ActorSystem()
implicit val materializer = ActorMaterializer()

import system.dispatcher

val request = HttpRequest(uri = "https://www.google.com")

Http.get(system).singleRequest(request).map(_.entity.dataBytes.runWith(Sink.ignore))
.onComplete { _ =>
println("shutting down actor system...")
system.terminate()
}

我收到以下错误消息:
shutting down actor system...
[ERROR] [02/11/2017 13:13:08.929] [default-akka.actor.default-dispatcher-4] [akka.actor.ActorSystemImpl(default)] Outgoing request stream error (akka.stream.AbruptTerminationException)

任何人都知道为什么 https 会产生上述错误,我该如何解决?

最佳答案

这显然是一个已知问题,请参阅以下票证:

  • akka-http#497
  • akka#18747

  • 该错误似乎无害。

    关于akka-stream - akka http 客户端 system.shutdown() 使用 https 时产生 "Outgoing request stream error (akka.stream.AbruptTerminationException)",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42181378/

    27 4 0
    Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
    广告合作:1813099741@qq.com 6ren.com