scala - Akka http 传出连接卡住
问题描述
调用下面的 httpConnection 既不会返回 Flow[HttpRequest, HttpResponse, Future[Http.OutgoingConnection]] 也不会进入 catch 块。它只是卡住了。
lazy val httpConnection= Try{
http().outgoingConnection(host,port)
}
catch{
case e:Exception: /***Action***/
}
httpConnection match {
case f:Flow[HttpRequest, HttpResponse,Future[Http.OutgoingConnection]] => Source.single(request).via(flow).runWith(Sink.head)
case e:Exception => logger("not able to get connection")
}
解决方案
推荐阅读
- proxy - 如何使用 CUBA Studio 创建应用程序?
- php - Laravel SQLSTATE [42S22]:找不到列:1054
- ios - 纹理未在 xcode ARKit 中渲染?
- css - 在 SVG 文件中更改背景时将笔划从黑色更改为白色
- selenium - 在 Click Button 的机器人框架上找不到定位器
- spring - Springboot:在同一台服务器上部署多个应用程序
- javascript - 如何在 vuex 商店中导入本地静态图像
- angular - 如何从路由器插座调用应用程序组件
- android - 缺少 Android 密钥密码,但我确实有密钥库密码
- python - 如何在python中找到gdal中的波段数?