rpcxio / rpcx-etcd

etcd plugin for rpcx
Apache License 2.0
29 stars 24 forks source link

etcd unregister注销时崩溃 #2

Closed ht101996 closed 3 years ago

ht101996 commented 3 years ago

anic: runtime error: makeslice: cap out of range

goroutine 20 [running]: github.com/rpcxio/rpcx-etcd/serverplugin.(EtcdV3RegisterPlugin).Unregister(0xc000140000, 0x18ed420, 0x8, 0x37a2bd0, 0xc000140000) /Users/mac/work/go/pkg/mod/github.com/rpcxio/rpcx-etcd@v0.0.0-20201223114009-7e3fe9c7ae7e/serverplugin/etcdv3.go:254 +0x767 github.com/smallnest/rpcx/server.(pluginContainer).DoUnregister(0xc00011e040, 0x18ed420, 0x8, 0x0, 0x0) /Users/mac/work/go/pkg/mod/github.com/smallnest/rpcx@v0.0.0-20201223122003-ca98a3ecb90c/server/plugin.go:188 +0x1bc github.com/smallnest/rpcx/server.(*Server).UnregisterAll(0xc00012e000, 0xc000000004, 0x1ae13dd) /Users/mac/work/go/pkg/mod/github.com/smallnest/rpcx@v0.0.0-20201223122003-ca98a3ecb90c/server/service.go:315 +0xfe

smallnest commented 3 years ago

原因在于没有service的时候调用Unregister导致。 已fixed,可以拉取最新的代码试试