Explorar o código

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

Gyu-Ho Lee %!s(int64=10) %!d(string=hai) anos
pai
achega
a4ef36c8bf
Modificáronse 1 ficheiros con 3 adicións e 2 borrados
  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,