🐛 Drop just connected service
This commit is contained in:
parent
8e1adfae9a
commit
7f8506e6ea
@ -1,7 +1,6 @@
|
|||||||
package directory
|
package directory
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/rs/zerolog/log"
|
|
||||||
"google.golang.org/grpc"
|
"google.golang.org/grpc"
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -24,8 +23,6 @@ func (v *ServiceInstance) GetGrpcConn() (*grpc.ClientConn, error) {
|
|||||||
|
|
||||||
conn, err := ConnectService(v)
|
conn, err := ConnectService(v)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
_ = RemoveServiceInstance(v.ID)
|
|
||||||
log.Error().Str("id", v.ID).Err(err).Msg("Failed to connect to service, dropped...")
|
|
||||||
return nil, err
|
return nil, err
|
||||||
} else {
|
} else {
|
||||||
connectionCache[v.ID] = conn
|
connectionCache[v.ID] = conn
|
||||||
|
Loading…
Reference in New Issue
Block a user