连接超时10秒到期,停止 - 永久断开连接

时间:2015-11-09 08:58:53

标签: akka spray spray-client

我正在尝试向网址发送GET请求。

public JsonResult GetPosts()
{
    var ret = (from post in db.Posts.ToList()
               orderby post.PostedDate descending)
               select new
               {
                   Message = post.Message,
                   PostedBy = post.PostedBy,
                   PostedByName = post.ApplicationUser.UserName,
                   PostedByAvatar = _GenerateAvatarUrlForUser(post.PostedBy),
                   PostedDate = post.PostedDate,
                   PostId = post.PostId,
               });

    return Json(ret, JsonRequestBehavior.AllowGet);
}

private string _GenerateAvatarUrlForUser(int? userId)
{
    if (!user.HasValue)
        return null;

    var avatarImage = db.Files.SingleOrDefault(s => s.ApplicationUserId == userId);

    if (avatarImage != null)
        return Url.Action("GetFileData", new { fileId = avatarImage.FileId });

    return null;
}

我收到以下回复后,我们的客户端不会发送任何后续请求。

val pipeline: HttpRequest => Future[HttpResponse] = (
            sendReceive
         )

val result = Await.result(pipeline(Get(url)), DEFAULT_TIMEOUT)

我必须重新启动服务器才能再次开始发送请求。

1 个答案:

答案 0 :(得分:0)

这是一个错误。

来自Johannes Rudolph -

问题可能是插槽从Unconnected状态变为Unconnected,现在不支持。

不幸的是,断开的插槽将一直存在,直到主机连接器本身关闭。

约翰内斯提出了这个问题 - https://github.com/spray/spray/issues/1085