mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2026-10-06 22:41:56 +02:00
stop a gRPC stream from the client-side callback is to return a specific error, e.g., io.EOF
This commit is contained in:
1 parent
629b520edf
commit
92525d78ce
1 file changed
+2
-2
@@ -417,10 +417,10 @@ func deleteEmptyParentDirectories(client filer_pb.SeaweedFilerClient, dirPath ut
|
||||
isEmpty := true
|
||||
err := filer_pb.SeaweedList(ctx, client, string(dirPath), "", func(entry *filer_pb.Entry, isLast bool) error {
|
||||
isEmpty = false
|
||||
return nil
|
||||
return io.EOF // Use sentinel error to explicitly stop iteration
|
||||
}, "", false, 1)
|
||||
|
||||
if err != nil {
|
||||
if err != nil && err != io.EOF {
|
||||
glog.V(3).Infof("deleteEmptyParentDirectories: error checking %s: %v", dirPath, err)
|
||||
return
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user