Finish with a connection to corosync. Takes a [Handle] as returned from [initialize]
(handle: &Handle)
| 133 | /// Finish with a connection to corosync. |
| 134 | /// Takes a [Handle] as returned from [initialize] |
| 135 | pub fn finalize(handle: &Handle) -> Result<()> { |
| 136 | let res = unsafe { ffi::cmap_finalize(handle.cmap_handle) }; |
| 137 | if res == ffi::CS_OK { |
| 138 | HANDLE_HASH.lock().unwrap().remove(&handle.cmap_handle); |
| 139 | Ok(()) |
| 140 | } else { |
| 141 | Err(CsError::from_c(res)) |
| 142 | } |
| 143 | } |
| 144 | |
| 145 | /// Return a file descriptor to use for poll/select on the CMAP handle. |
| 146 | /// Takes a [Handle] as returned from [initialize], |