change to uuid.NewRandom to avoid panic
Signed-off-by: akhilac1 <chetlapalle.akhila@gmail.com>
This commit is contained in:
parent
3d3864956a
commit
5e58fa4efe
|
@ -403,7 +403,11 @@ func (p *ConfigurationStore) subscribeToChannel(ctx context.Context, pgNotifyCha
|
|||
}
|
||||
}
|
||||
stop := make(chan struct{})
|
||||
subscribeID = uuid.New().String()
|
||||
subscribeUID, err := uuid.NewRandom()
|
||||
if err != nil {
|
||||
return "", fmt.Errorf("unable to generate subscription id - %w", err)
|
||||
}
|
||||
subscribeID = subscribeUID.String()
|
||||
p.subscribeStopChanMap[subscribeID] = stop
|
||||
p.ActiveSubscriptions[channel] = &subscription{
|
||||
uuid: subscribeID,
|
||||
|
|
Loading…
Reference in New Issue