Browse Source

Merge pull request #6031 from gyuho/vet-fix

grpcproxy: define 'watchergroups' in pointer
Gyu-Ho Lee 9 years ago
parent
commit
116a1b5855
1 changed files with 2 additions and 2 deletions
  1. 2 2
      proxy/grpcproxy/watch.go

+ 2 - 2
proxy/grpcproxy/watch.go

@@ -50,7 +50,7 @@ func (wp *watchProxy) Watch(stream pb.Watch_WatchServer) (err error) {
 
 
 	sws := serverWatchStream{
 	sws := serverWatchStream{
 		c:      wp.c,
 		c:      wp.c,
-		groups: wp.wgs,
+		groups: &wp.wgs,
 
 
 		id:         wp.nextStreamID,
 		id:         wp.nextStreamID,
 		gRPCStream: stream,
 		gRPCStream: stream,
@@ -71,7 +71,7 @@ type serverWatchStream struct {
 	c  *clientv3.Client
 	c  *clientv3.Client
 
 
 	mu      sync.Mutex // make sure any access of groups and singles is atomic
 	mu      sync.Mutex // make sure any access of groups and singles is atomic
-	groups  watchergroups
+	groups  *watchergroups
 	singles map[int64]*watcherSingle
 	singles map[int64]*watcherSingle
 
 
 	gRPCStream pb.Watch_WatchServer
 	gRPCStream pb.Watch_WatchServer