We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
At https://github.com/containernetworking/cni/blob/main/libcni/api.go#L378, if cni has added network data into cni cache file path (default /var/lib/cni/results/xxx ), but the machine just restarted and the cni cache data may not saved because of disk synchronization.
So, if fdata is empty, may return nil is a more reasonable implementation?
fdata, err := os.ReadFile(fname) if err != nil { // Ignore read errors; the cached result may not exist on-disk return nil, nil } if fdata == "" { return nil, nil }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
At https://github.com/containernetworking/cni/blob/main/libcni/api.go#L378, if cni has added network data into cni cache file path (default /var/lib/cni/results/xxx ), but the machine just restarted and the cni cache data may not saved because of disk synchronization.
So, if fdata is empty, may return nil is a more reasonable implementation?
fdata, err := os.ReadFile(fname) if err != nil { // Ignore read errors; the cached result may not exist on-disk return nil, nil } if fdata == "" { return nil, nil }
The text was updated successfully, but these errors were encountered: