diff --git a/Cargo.lock b/Cargo.lock index 85bb3dbd..e3699174 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -829,9 +829,9 @@ dependencies = [ [[package]] name = "inotify" -version = "0.10.0" +version = "0.10.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "abf888f9575c290197b2c948dc9e9ff10bd1a39ad1ea8585f734585fa6b9d3f9" +checksum = "fdd168d97690d0b8c412d6b6c10360277f4d7ee495c5d0d5d5fe0854923255cc" dependencies = [ "bitflags 1.3.2", "futures-core", diff --git a/src/enclave_proc/socket.rs b/src/enclave_proc/socket.rs index 0e60a8fc..96b2716a 100644 --- a/src/enclave_proc/socket.rs +++ b/src/enclave_proc/socket.rs @@ -75,7 +75,7 @@ impl EnclaveProcSock { pub fn start_monitoring(&mut self, exit_on_delete: bool) -> NitroCliResult<()> { let path_clone = self.socket_path.clone(); let requested_remove_clone = self.requested_remove.clone(); - let mut socket_inotify = Inotify::init().map_err(|e| { + let socket_inotify = Inotify::init().map_err(|e| { new_nitro_cli_failure!( &format!("Failed to initialize socket notifications: {:?}", e), NitroCliErrorEnum::InotifyError @@ -86,7 +86,8 @@ impl EnclaveProcSock { // - IN_DELETE_SELF: triggered when the socket file inode gets removed. // - IN_ATTRIB: triggered when the reference count of the file inode changes. socket_inotify - .add_watch( + .watches() + .add( self.socket_path.as_path(), WatchMask::ATTRIB | WatchMask::DELETE_SELF, )