Releases a set of global data handles owned by the parent service interface.
| 28 | // Releases a set of global data handles owned by the parent service |
| 29 | // interface. |
| 30 | void ReleaseHandles(ServiceInterface* parent, |
| 31 | const absl::Span<const GlobalDataHandle> handles) { |
| 32 | UnregisterRequest request; |
| 33 | for (auto& handle : handles) { |
| 34 | VLOG(1) << "Requesting to unregister " << handle.ShortDebugString(); |
| 35 | *request.add_data() = handle; |
| 36 | } |
| 37 | UnregisterResponse response; |
| 38 | Status status = parent->Unregister(&request, &response); |
| 39 | VLOG(1) << "Done with request"; |
| 40 | if (!status.ok()) { |
| 41 | LOG(WARNING) << "Failed to unregister handles: " << status |
| 42 | << "; continuing anyway..."; |
| 43 | } |
| 44 | } |
| 45 | |
| 46 | } // namespace |
| 47 |
no test coverage detected