Skip to content

Commit

Permalink
config listen execute max chan (#403)
Browse files Browse the repository at this point in the history
  • Loading branch information
binbin0325 authored Feb 12, 2022
1 parent 494f91e commit d91ced4
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions clients/config_client/config_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ package config_client
import (
"errors"
"fmt"
"math"
"os"
"strings"
"sync"
Expand Down Expand Up @@ -116,8 +117,8 @@ func NewConfigClient(nc nacos_client.INacosClient) (*ConfigClient, error) {
config.uid = uid.String()

config.cacheMap = cache.NewConcurrentMap()

config.listenExecute = make(chan struct{}, 1)
// maximum buffered queue to prevent chan deadlocks during frequent configuration file updates
config.listenExecute = make(chan struct{}, math.MaxInt64)

config.startInternal()

Expand Down

0 comments on commit d91ced4

Please sign in to comment.