Browse Source

protect against nil deletion results

fix https://github.com/chrislusf/seaweedfs/issues/1180
pull/1189/head
Chris Lu 5 years ago
parent
commit
8dd260623e
  1. 10
      weed/operation/delete_content.go

10
weed/operation/delete_content.go

@ -4,12 +4,14 @@ import (
"context" "context"
"errors" "errors"
"fmt" "fmt"
"github.com/chrislusf/seaweedfs/weed/glog"
"github.com/chrislusf/seaweedfs/weed/pb/volume_server_pb"
"google.golang.org/grpc"
"net/http" "net/http"
"strings" "strings"
"sync" "sync"
"google.golang.org/grpc"
"github.com/chrislusf/seaweedfs/weed/glog"
"github.com/chrislusf/seaweedfs/weed/pb/volume_server_pb"
) )
type DeleteResult struct { type DeleteResult struct {
@ -94,7 +96,7 @@ func DeleteFilesWithLookupVolumeId(grpcDialOption grpc.DialOption, fileIds []str
if deleteResults, deleteErr := DeleteFilesAtOneVolumeServer(server, grpcDialOption, fidList); deleteErr != nil { if deleteResults, deleteErr := DeleteFilesAtOneVolumeServer(server, grpcDialOption, fidList); deleteErr != nil {
err = deleteErr err = deleteErr
} else {
} else if deleteResults != nil {
resultChan <- deleteResults resultChan <- deleteResults
} }

Loading…
Cancel
Save