esdiff icon indicating copy to clipboard operation
esdiff copied to clipboard

catch bug ^_^

Open yangxuanjia opened this issue 3 years ago • 0 comments

I think 'case doc, ok := <-dstCh:' maybe change srcCh.

if srcDoc != nil && dstDoc == nil {
  diffCh <- Diff{Mode: Deleted, Src: srcDoc}
  for {
    select {
    case doc, ok := <-dstCh:
      if !ok {
        return
      }
      diffCh <- Diff{Mode: Deleted, Src: doc}
    case <-ctx.Done():
      errCh <- ctx.Err()
      return
    }
  }
}

yangxuanjia avatar Nov 16 '22 07:11 yangxuanjia