Skip to content

生产环境nacos server异常时,触发reconnect,当nacos恢复正常时,服务未重新注册上 #863

@Cccalm123

Description

@Cccalm123

What version of nacos-sdk-go are you using?

nacos版本2.2.8

What version of Go are you using (go version)?

go1.25.4

What operating system (Linux, Windows, …) and version?

linux生产环境

What did you do?

If possible, provide a recipe for reproducing the error.
查看nacos sdk日志,发现在第一次重新register时,有注册的请求日志,注册失败,下一次Request方法重试,不再出现注册的请求日志

What did you expect to see?

正常情况下会重新进行注册请求,查看源代码发现产生了死锁,第二次request重试时,调用switchServerAsync方法,会重新写入一个reconnect的event chan,这时上一个reconnect还未结束,发生阻塞

What did you see instead?

这里的request重试是否可以去掉?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions