Skip to content

Commit

Permalink
shmap v0.4.5
Browse files Browse the repository at this point in the history
  • Loading branch information
BarbossHack committed Dec 23, 2023
1 parent 58d6075 commit 19d6f5e
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
6 changes: 3 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,16 @@ license = "MIT OR Apache-2.0"
name = "shmap"
readme = "README.md"
repository = "https://github.com/BarbossHack/shmap"
version = "0.4.4"
version = "0.4.5"

[dependencies]
aes-gcm = { version = "0.10", features = ["std"] }
bincode = { version = "=2.0.0-rc.3", default-features = false, features = ["std", "serde"] }
chrono = { version = "0.4", features = ["serde"] }
fdlimit = "0.2"
fdlimit = "0.3"
libc = "0.2"
log = "0.4"
memmap2 = "0.7"
memmap2 = "0.9"
named-lock = "0.3"
rand = "0.8"
serde = { version = "1.0", features = ["serde_derive"] }
Expand Down
4 changes: 3 additions & 1 deletion src/map.rs
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,9 @@ impl Shmap {
}

fn _new(encryption_key: Option<&[u8; 32]>) -> Self {
fdlimit::raise_fd_limit();
if let Err(e) = fdlimit::raise_fd_limit() {
warn!("Could not set fd_limit : {e}");
}

// If an encryption key was provided, create a `cipher` for AES256-GCM
let cipher = encryption_key.map(|key| {
Expand Down
2 changes: 1 addition & 1 deletion src/tests/map.rs
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ fn test_many_fd() {
shmap.remove(key).unwrap();
});

fdlimit::raise_fd_limit();
fdlimit::raise_fd_limit().unwrap();
}

// test concurrency between set
Expand Down

0 comments on commit 19d6f5e

Please sign in to comment.