server: use buffered channel to avoid goroutine leak (#11941)

Signed-off-by: Gaurav Singh <gaurav1086@gmail.com>
release-3.5
gaurav 2020-08-21 21:46:28 -04:00 committed by GitHub
parent 261aa31dc5
commit c199d3d8c3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -734,7 +734,7 @@ func (s *EtcdServer) start() {
s.applyWait = wait.NewTimeList()
s.done = make(chan struct{})
s.stop = make(chan struct{})
s.stopping = make(chan struct{})
s.stopping = make(chan struct{}, 1)
s.ctx, s.cancel = context.WithCancel(context.Background())
s.readwaitc = make(chan struct{}, 1)
s.readNotifier = newNotifier()