Browse Source

proxy/grpcproxy: fix nil-map assign to 'singles'

Gyu-Ho Lee 9 years ago
parent
commit
a4ef36c8bf
1 changed files with 3 additions and 2 deletions
  1. 3 2
      proxy/grpcproxy/watch.go

+ 3 - 2
proxy/grpcproxy/watch.go

@@ -49,8 +49,9 @@ func (wp *watchProxy) Watch(stream pb.Watch_WatchServer) (err error) {
 	wp.mu.Unlock()
 
 	sws := serverWatchStream{
-		cw:     wp.cw,
-		groups: &wp.wgs,
+		cw:      wp.cw,
+		groups:  &wp.wgs,
+		singles: make(map[int64]*watcherSingle),
 
 		id:         wp.nextStreamID,
 		gRPCStream: stream,