Releasing 2.1.0 with the proto and lib-go-changes
Change-Id: I585fe460e92fe0a778573a52e37f2b821333fc81
diff --git a/vendor/github.com/opencord/voltha-lib-go/v7/pkg/grpc/client.go b/vendor/github.com/opencord/voltha-lib-go/v7/pkg/grpc/client.go
index bbec5a3..add2b28 100644
--- a/vendor/github.com/opencord/voltha-lib-go/v7/pkg/grpc/client.go
+++ b/vendor/github.com/opencord/voltha-lib-go/v7/pkg/grpc/client.go
@@ -378,9 +378,17 @@
select {
case <-ctx.Done():
logger.Debugw(ctx, "context-closing", log.Fields{"endpoint": c.apiEndPoint})
- return
+ break loop
case event := <-c.events:
logger.Debugw(ctx, "received-event", log.Fields{"event": event, "endpoint": c.apiEndPoint})
+ c.connectionLock.RLock()
+ // On a client stopped, just allow the stop event to go through
+ if c.done && event != eventStopped {
+ c.connectionLock.RUnlock()
+ logger.Debugw(ctx, "ignoring-event-on-client-stop", log.Fields{"event": event, "endpoint": c.apiEndPoint})
+ continue
+ }
+ c.connectionLock.RUnlock()
switch event {
case eventConnecting:
c.stateLock.Lock()
@@ -404,7 +412,11 @@
return
}
attempt += 1
- c.events <- eventConnecting
+ c.connectionLock.RLock()
+ if !c.done {
+ c.events <- eventConnecting
+ }
+ c.connectionLock.RUnlock()
} else {
backoff.Reset()
}
@@ -544,11 +556,14 @@
}
func (c *Client) Stop(ctx context.Context) {
+ c.connectionLock.Lock()
+ defer c.connectionLock.Unlock()
if !c.done {
+ c.done = true
c.events <- eventStopped
close(c.events)
- c.done = true
}
+ logger.Infow(ctx, "client-stopped", log.Fields{"endpoint": c.apiEndPoint})
}
// SetService is used for testing only
diff --git a/vendor/modules.txt b/vendor/modules.txt
index 7c225ce..d8288c7 100644
--- a/vendor/modules.txt
+++ b/vendor/modules.txt
@@ -126,7 +126,7 @@
github.com/opencord/omci-lib-go/v2
github.com/opencord/omci-lib-go/v2/generated
github.com/opencord/omci-lib-go/v2/meframe
-# github.com/opencord/voltha-lib-go/v7 v7.1.0
+# github.com/opencord/voltha-lib-go/v7 v7.1.1
## explicit
github.com/opencord/voltha-lib-go/v7/pkg/config
github.com/opencord/voltha-lib-go/v7/pkg/db