Skip to content

Use a separate gorutine to handle the logic of reconnect - #691

Merged
wolfstudy merged 6 commits into
apache:masterfrom
wolfstudy:xiaolong/split-eventsCh
Dec 27, 2021
Merged

wolfstudy merged 6 commits into
apache:masterfrom
wolfstudy:xiaolong/split-eventsCh

Conversation

@wolfstudy

@wolfstudy wolfstudy commented Dec 24, 2021 •

Copy link
Copy Markdown
Member

Signed-off-by: xiaolongran [email protected]

Fixes #687

Motivation

As #687 said, use a separate gorutine to handle the logic of reconnect. Avoid blocking the reconnection logic due to the gorutine block of runEventsLoop

@wolfstudy wolfstudy added this to the v0.8.0 milestone Dec 24, 2021
@wolfstudy wolfstudy self-assigned this Dec 24, 2021
@wolfstudy wolfstudy changed the title Split eventsCh to use a separate Channel to handle runEventsLoop Use a separate gorutine to handle the logic of reconnect Dec 27, 2021
@wolfstudy
wolfstudy merged commit 39e13ac into apache:master Dec 27, 2021

go func() {
for {
for range p.connectClosedCh {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is going to leak a go routine since the p.connectClosedCh is never closed?

wolfstudy pushed a commit that referenced this pull request Jan 6, 2022
wolfstudy added a commit that referenced this pull request Jan 6, 2022
* Revert "Use a separate gorutine to handle the logic of reconnect (#691)"

This reverts commit 39e13ac.

* add closeCh for go rutine leak

Signed-off-by: xiaolongran <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Discuss] Split eventsCh to use a separate Channel to handle runEventsLoop

3 participants