Merge pull request #12925 from yangxuanjia/yxjetcd_check_resuming
check resuming len to avoid panicrelease-3.5
commit
3b24496c2a
|
@ -581,10 +581,12 @@ func (w *watchGrpcStream) run() {
|
|||
switch {
|
||||
case pbresp.Created:
|
||||
// response to head of queue creation
|
||||
if ws := w.resuming[0]; ws != nil {
|
||||
w.addSubstream(pbresp, ws)
|
||||
w.dispatchEvent(pbresp)
|
||||
w.resuming[0] = nil
|
||||
if len(w.resuming) != 0 {
|
||||
if ws := w.resuming[0]; ws != nil {
|
||||
w.addSubstream(pbresp, ws)
|
||||
w.dispatchEvent(pbresp)
|
||||
w.resuming[0] = nil
|
||||
}
|
||||
}
|
||||
|
||||
if ws := w.nextResume(); ws != nil {
|
||||
|
|
Loading…
Reference in New Issue