Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

bug: CLI hangs indefinitely during network failures due to missing `http.Client` timeouts

未关闭 适合新手
#545 2 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
2/5
预计耗时
1-3 小时
新手友好度
68/100
Issue 类型
缺陷
描述清晰度
基本清楚
活跃度
活跃
技术栈
go
领域
cli, networking

调研方向

跟踪 CLI 的内部 HTTP 客户端初始化,并使用 start 或 simulate 命令针对无响应的 Microcks 或 Keycloak 服务器重现挂起。将客户端超时设置为 30 秒,并验证该命令会返回有帮助的超时错误,而不是无限期等待。

由索引模型根据 Issue 内容生成。

描述

Describe the bug

The CLI currently initializes its internal HTTP clients without explicitly setting a Timeout field. In Go, an http.Client without a configured timeout (or when using http.DefaultClient) will default to waiting infinitely. If a network connection silently drops, or if the Microcks/Keycloak server is locked up and unresponsive, the CLI freezes forever in the terminal and must be manually killed by the user.

Expected behavior

The CLI should fail fast with a helpful connection timeout error (e.g., context deadline exceeded or timeout) if the server takes longer than 30 seconds to respond, returning control to the user.

Actual behavior

The CLI hangs infinitely in the terminal with no output.

How to Reproduce?

Try with start or simulate it.

Microcks version or git rev

No response

Install method (docker-compose, helm chart, operator, docker-desktop extension,...)

No response

Additional information

No response

主要语言
Go
星标
52
派生
67
平均合并
3 天 23 小时
30 天内合并 PR
23

环境准备

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

microcks/microcks-cli 的其他 Issue

查看 microcks/microcks-cli 的全部 Issue

相似的 Issue

更多 Go Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。