apache / apache/pulsar-client-go

goroutine leak

Open
#462 3 comments 0 reactions 0 assignees View on GitHub
Dominant language
Go
Stars
745
Forks
389
Avg merge
3d 20h
Merged PRs (30d)
3

Description

#### Expected behavior

```
func (c *connection) start() {
// Each connection gets its own goroutine that will
go func() {
if c.connect() {
if c.doHandshake() {
c.run()
} else {
c.changeState(connectionClosed)
}
} else {
c.changeState(connectionClosed)
}
}()
}
```
this code, If the pulsar doesn't work properly, it will cause a goroutine leak.

Contributor guide

Open the contributing guide

Research direction

The issue points to connection.start and its connect, doHandshake, run, and changeState calls; begin by tracing how failures move through this goroutine and how connection shutdown is represented. Reproduce the reported non-working-Pulsar case if possible, then verify that the goroutine terminates and the connection reaches connectionClosed.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
distributed-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.