链接关闭的时候有概率发生 panic

Open Beginner friendly
#400 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
68/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Quiet
Tech stack
go
Domain
backend

Research direction

The issue does not name a specific file or test. Start by tracing the Go code that closes connections and writes to internal channels, especially the shutdown/stop path where close and send operations may race. Reproduce the panic by running the project’s tests or example server flow and repeatedly opening/closing while other goroutines send. Done when shutdown can be exercised without the panic "send on closed channel" appearing and tests/build still pass.

Written by the indexing model from the issue text.

Description

在跟着《深入理解GO语言》搓框架,在测试的时候发现在关闭的时候有概率发生panic,原因是 sent to closed channle
极小概率,同时看到 issue 中有人提了一下但是不被重视,个人建议要不要加一个recover避免出问题

Dominant language
Go
Stars
7.8k
Forks
1.3k
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from aceld/zinx

All issues in aceld/zinx

Similar issues

More Go issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.